83#define AIO_NOTRETURNED 1
88#define AIO_LIO_NO_NOTIFY 0
91#define AIO_LIO_SIGEV 1
94#define AIO_LIO_EVENT 2
120 pthread_mutex_t
mutex;
138 pthread_mutex_t
mutex;
199 pthread_mutex_t
mutex;
209 pthread_mutex_t
mutex;
210 pthread_cond_t new_req;
235#define AIO_QUEUE_INITIALIZED 0xB00B
237#ifndef AIO_MAX_THREADS
238#define AIO_MAX_THREADS 5
241#ifndef AIO_LISTIO_MAX
242#define AIO_LISTIO_MAX 20
246#define RTEMS_AIO_MAX 100
359 const struct aiocb* aiocbp,
366#define AIO_assert(_x) assert(_x)
367#define AIO_printf(_x) printf(_x)
369#define AIO_assert(_x)
370#define AIO_printf(_x)
POSIX Asynchronous I/O Support.
rtems_aio_request * rtems_aio_search_in_chain(const struct aiocb *aiocbp, rtems_chain_control *fd_chain)
Search a request in an fd chain.
Definition: aio_misc.c:875
void rtems_aio_remove_fd(rtems_aio_request_chain *r_chain)
Removes all the requests in a FD chain.
Definition: aio_misc.c:423
void rtems_aio_update_suspendcbp(rtems_aio_suspendcb *suspendcbp)
updates suspendcb after related op completion
Definition: aio_misc.c:288
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:325
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:569
int rtems_aio_remove_req(rtems_chain_control *chain, struct aiocb *aiocbp)
Remove request from given chain.
Definition: aio_misc.c:442
int rtems_aio_enqueue(rtems_aio_request *req)
Enqueue requests, and creates threads to process them.
Definition: aio_misc.c:465
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:211
void rtems_aio_completed_list_op(listcb *listcbp)
updates listcb after op completion
Definition: aio_misc.c:259
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.
This structure represents a chain node.
Definition: chain.h:78
Control block for every list enqueued with lio_listio()
Definition: aio_misc.h:119
lio_notification_union lio_notification
event to do at list completion
Definition: aio_misc.h:129
int requests_left
number of requests left to complete the list
Definition: aio_misc.h:123
int notification_type
type of notification
Definition: aio_misc.h:126
The queue of all the requests in progress and waiting to be processed.
Definition: aio_misc.h:208
int idle_threads
The number of idle threads.
Definition: aio_misc.h:226
rtems_chain_control work_req
Chains being worked by active threads.
Definition: aio_misc.h:214
int active_threads
The number of active threads.
Definition: aio_misc.h:223
rtems_chain_control idle_req
Chains waiting to be processed.
Definition: aio_misc.h:217
atomic_int queued_requests
The number of queued requests.
Definition: aio_misc.h:229
unsigned int initialized
Specific value if queue is initialized.
Definition: aio_misc.h:220
A chain of requests for the same FD.
Definition: aio_misc.h:186
rtems_chain_control perfd
Chain of requests for this fd.
Definition: aio_misc.h:191
rtems_chain_node next_fd
Order fd chains in queue.
Definition: aio_misc.h:188
int new_fd
Indicates if this is a newly created chain.
Definition: aio_misc.h:197
int fildes
File descriptor to be processed.
Definition: aio_misc.h:194
The request being processed.
Definition: aio_misc.h:155
rtems_chain_node next_prio
Chain requests in order of priority.
Definition: aio_misc.h:157
listcb * listcbp
pointer to list control block
Definition: aio_misc.h:169
int op_type
Operation type.
Definition: aio_misc.h:178
rtems_aio_suspendcb * suspendcbp
pointer to suspend control block
Definition: aio_misc.h:172
int priority
see above
Definition: aio_misc.h:163
int policy
If _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined.
Definition: aio_misc.h:160
struct aiocb * aiocbp
Aio control block.
Definition: aio_misc.h:175
pthread_t caller_thread
Used for notification.
Definition: aio_misc.h:166
Control block for every list involved in a aio_suspend() call.
Definition: aio_misc.h:137
int task_id
id of the thread that called aio_suspend()
Definition: aio_misc.h:144
int requests_left
number of requests left to complete the list
Definition: aio_misc.h:141
int notified
controls if the notification already happend
Definition: aio_misc.h:147
This union represents a chain control block.
Definition: chain.h:96
holds a pointer to a sigevent struct or a thread id
Definition: aio_misc.h:106
int task_id
id of the thread that called lio_listio()
Definition: aio_misc.h:111
struct sigevent * sigp
pointer to the sigevent for notification
Definition: aio_misc.h:108