20#ifndef ZEPHYR_INCLUDE_ZEPHYR_POSIX_AIO_H_
21#define ZEPHYR_INCLUDE_ZEPHYR_POSIX_AIO_H_
28#include <zephyr/toolchain.h>
34#if !defined(_OFF_T_DECLARED) && !defined(__off_t_defined)
37#define _OFF_T_DECLARED
38#define __off_t_defined
42#define __SIZE_TYPE__ unsigned long
45#if !defined(_SSIZE_T_DECLARED) && !defined(__ssize_t_defined)
47#define unsigned signed
48typedef __SIZE_TYPE__ ssize_t;
50#define _SSIZE_T_DECLARED
51#define __ssize_t_defined
57#if __STDC_VERSION__ >= 201112L
60#if !defined(_TIMESPEC_DECLARED) && !defined(__timespec_defined)
66#define _TIMESPEC_DECLARED
67#define __timespec_defined
78#if defined(_POSIX_REALTIME_SIGNALS) || defined(__DOXYGEN__)
84#if _POSIX_C_SOURCE >= 200112L
int aio_write(struct aiocb *aiocbp)
Enqueue an asynchronous write operation.
ssize_t aio_return(struct aiocb *aiocbp)
Retrieve the return status of a completed asynchronous I/O request.
int aio_read(struct aiocb *aiocbp)
Enqueue an asynchronous read operation.
int aio_error(const struct aiocb *aiocbp)
Retrieve the error status of an asynchronous I/O request.
int lio_listio(int mode, struct aiocb *const ZRESTRICT list[], int nent, struct sigevent *ZRESTRICT sig)
Initiate a list of asynchronous I/O requests.
int aio_fsync(int filedes, struct aiocb *aiocbp)
Asynchronously synchronise a file's data and metadata to storage.
int aio_suspend(const struct aiocb *const list[], int nent, const struct timespec *timeout)
Wait for one or more asynchronous I/O requests to complete.
int aio_cancel(int fildes, struct aiocb *aiocbp)
Cancel an outstanding asynchronous I/O request.
long off_t
File offset type.
Asynchronous I/O control block.
off_t aio_offset
File offset for the operation.
volatile void * aio_buf
Data buffer for read or write.
size_t aio_nbytes
Number of bytes to transfer.
struct sigevent aio_sigevent
Notification method on completion.
int aio_reqprio
Request priority offset.
int aio_lio_opcode
Operation code for lio_listio() (LIO_READ, LIO_WRITE, LIO_NOP).
int aio_fildes
File descriptor.
Structure describing how to notify about an asynchronous event.
Time value with nanosecond resolution.
long tv_nsec
Nanoseconds [0, 999999999].
POSIX time-of-day types and functions (<sys/time.h>)