RTEMS 6.1-rc6
|
Private implementation for Asynchronous I/O. More...
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <signal.h>
#include <rtems/posix/aio_misc.h>
#include <rtems/score/assert.h>
#include <errno.h>
#include <limits.h>
Functions | |
int | rtems_aio_init (void) |
Initialize the request queue for AIO Operations. | |
rtems_aio_request * | init_write_req (struct aiocb *aiocbp) |
initializes a read rtems_aio_request | |
rtems_aio_request * | init_read_req (struct aiocb *aiocbp) |
initializes a write rtems_aio_request | |
void | rtems_aio_completed_list_op (listcb *listcbp) |
updates listcb after op completion | |
rtems_aio_request_chain * | rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create) |
Search for and create a chain of requests for a given file descriptor. | |
void | rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) |
Removes all the requests in a FD chain. | |
int | rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) |
Remove request from given chain. | |
int | rtems_aio_enqueue (rtems_aio_request *req) |
Enqueue requests, and creates threads to process them. | |
int | rtems_aio_check_sigevent (struct sigevent *sigp) |
Checks the validity of a sigevent struct. | |
Variables | |
rtems_aio_queue | aio_request_queue |
Private implementation for Asynchronous I/O.
This file contains the implementation of private methods used for the processing of Asynchronous I/O requests.
rtems_aio_request * init_read_req | ( | struct aiocb * | aiocbp | ) |
initializes a write rtems_aio_request
aiocb | pointer to the aiocb describing the request |
NULL | the aiocb passed was invalid, errno indicates the error: |
rtems_aio_request * init_write_req | ( | struct aiocb * | aiocbp | ) |
initializes a read rtems_aio_request
aiocb | pointer to the aiocb describing the request |
NULL | the aiocb passed was invalid, errno indicates the error: |
int rtems_aio_check_sigevent | ( | struct sigevent * | sigp | ) |
Checks the validity of a sigevent struct.
Checks if the pointer passed as parameter points to a valid sigevent struct.
sigp | Is a pointer to the sigevent struct to check. |
0 | The struct is not valid. |
1 | The struct is valid. |
void rtems_aio_completed_list_op | ( | listcb * | listcbp | ) |
updates listcb after op completion
listcbp |
int rtems_aio_enqueue | ( | rtems_aio_request * | req | ) |
Enqueue requests, and creates threads to process them.
[in,out] | req | A pointer to the request. |
0 | if the request was added to the queue, errno otherwise. |
int rtems_aio_init | ( | void | ) |
Initialize the request queue for AIO Operations.
0 | The queue has bees succesfully initialized. |
-1 | An error occured while initializing the queue. |
void rtems_aio_remove_fd | ( | rtems_aio_request_chain * | r_chain | ) |
Removes all the requests in a FD chain.
[in,out] | r_chain | A pointer to a chain of requests for a given FD |
int rtems_aio_remove_req | ( | rtems_chain_control * | chain, |
struct aiocb * | aiocbp | ||
) |
Remove request from given chain.
[in,out] | chain | A pointer to the FD chain that may contain the request |
[in,out] | aiocbp | A pointer to the AIO control block of the request. |
AIO_CANCELED | The request was canceled. |
AIO_NOTCANCELED | The request was not canceled. |
rtems_aio_request_chain * rtems_aio_search_fd | ( | rtems_chain_control * | chain, |
int | fildes, | ||
int | create | ||
) |
Search for and create a chain of requests for a given file descriptor.
[in,out] | chain | A pointer to a chain of FD chains. |
[in] | fildes | The file descriptor to search for. |
[in] | create | If create == 0, the function just searches for the given FD. If create == 1, the function creates a new chain if none is found. |
NULL | If create == 0 and no chain is found for the given FD. |