83#define AIO_NOTRETURNED 1
88#define AIO_LIO_NO_NOTIFY 0
91#define AIO_LIO_SIGEV 1
94#define AIO_LIO_EVENT 2
115 pthread_mutex_t mutex;
173 pthread_mutex_t mutex;
183 pthread_mutex_t mutex;
184 pthread_cond_t new_req;
209#define AIO_QUEUE_INITIALIZED 0xB00B
211#ifndef AIO_MAX_THREADS
212#define AIO_MAX_THREADS 5
217#define AIO_LISTIO_MAX 20
220#define RTEMS_AIO_MAX 100
254 rtems_chain_control *chain,
276 rtems_chain_control *chain,
321#define AIO_assert(_x) assert(_x)
322#define AIO_printf(_x) printf(_x)
324#define AIO_assert(_x)
325#define AIO_printf(_x)
POSIX Asynchronous I/O Support.
void rtems_aio_remove_fd(rtems_aio_request_chain *r_chain)
Removes all the requests in a FD chain.
Definition aio_misc.c:373
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.
Definition aio_misc.c:285
int rtems_aio_init(void)
Initialize the request queue for AIO Operations.
Definition aio_misc.c:116
int rtems_aio_check_sigevent(struct sigevent *sigp)
Checks the validity of a sigevent struct.
Definition aio_misc.c:525
int rtems_aio_remove_req(rtems_chain_control *chain, struct aiocb *aiocbp)
Remove request from given chain.
Definition aio_misc.c:392
int rtems_aio_enqueue(rtems_aio_request *req)
Enqueue requests, and creates threads to process them.
Definition aio_misc.c:421
rtems_aio_request * init_write_req(struct aiocb *aiocbp)
initializes a read rtems_aio_request
Definition aio_misc.c:163
rtems_aio_request * init_read_req(struct aiocb *aiocbp)
initializes a write rtems_aio_request
Definition aio_misc.c:210
void rtems_aio_completed_list_op(listcb *listcbp)
updates listcb after op completion
Definition aio_misc.c:257
This header file provides the interfaces of the Assert Handler.
This header file provides the Chains API.
POSIX Threads Private Support.
This header file defines the RTEMS Classic API.
This header file defines macros to set errno and return minus one.
Control block for every list enqueued with lio_listio().
Definition aio_misc.h:114
lio_notification_union lio_notification
event to do at list completion
Definition aio_misc.h:124
int requests_left
number of requests left to complete the list
Definition aio_misc.h:118
int notification_type
type of notification
Definition aio_misc.h:121
The queue of all the requests in progress and waiting to be processed.
Definition aio_misc.h:182
int idle_threads
The number of idle threads.
Definition aio_misc.h:200
rtems_chain_control work_req
Chains being worked by active threads.
Definition aio_misc.h:188
int active_threads
The number of active threads.
Definition aio_misc.h:197
rtems_chain_control idle_req
Chains waiting to be processed.
Definition aio_misc.h:191
atomic_int queued_requests
The number of queued requests.
Definition aio_misc.h:203
unsigned int initialized
Specific value if queue is initialized.
Definition aio_misc.h:194
A chain of requests for the same FD.
Definition aio_misc.h:160
rtems_chain_control perfd
Chain of requests for this fd.
Definition aio_misc.h:165
rtems_chain_node next_fd
Order fd chains in queue.
Definition aio_misc.h:162
int new_fd
Indicates if this is a newly created chain.
Definition aio_misc.h:171
int fildes
File descriptor to be processed.
Definition aio_misc.h:168
The request being processed.
Definition aio_misc.h:132
rtems_chain_node next_prio
Chain requests in order of priority.
Definition aio_misc.h:134
listcb * listcbp
pointer to list control block
Definition aio_misc.h:146
int op_type
Operation type.
Definition aio_misc.h:152
int priority
see above
Definition aio_misc.h:140
int policy
If _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined.
Definition aio_misc.h:137
struct aiocb * aiocbp
Aio control block.
Definition aio_misc.h:149
pthread_t caller_thread
Used for notification.
Definition aio_misc.h:143
holds a pointer to a sigevent struct or a thread id
Definition aio_misc.h:101
int task_id
id of the thread that called lio_listio()
Definition aio_misc.h:106
struct sigevent * sigp
pointer to the sigevent for notification
Definition aio_misc.h:103