14.19. Data Definitions for librt

This section defines global identifiers and their values that are associated with interfaces contained in librt. These definitions are organized into groups that correspond to system headers. This convention is used as a convenience for the reader, and does not imply the existence of these headers, or their content. Where an interface is defined as requiring a particular system header file all of the data definitions for that system header file presented here shall be in effect.

This section gives data definitions to promote binary application portability, not to repeat source interface definitions available elsewhere. System providers and application developers should use this ABI to supplement - not to replace - source interface definition specifications.

This specification uses the ISO C (1999) C Language as the reference programming language, and data definitions are specified in ISO C format. The C language is used here as a convenient notation. Using a C language description of these data objects does not preclude their use by other programming languages.

14.19.1. aio.h


#define AIO_CANCELED	0
#define AIO_NOTCANCELED	1
#define AIO_ALLDONE	2

#define LIO_READ	0
#define LIO_WRITE	1
#define LIO_NOP	2

#define LIO_WAIT	0
#define LIO_NOWAIT	1

struct aiocb {
    int aio_fildes;		/* File desriptor */
    int aio_lio_opcode;		/* Operation to be performed */
    int aio_reqprio;		/* Request priority offset */
    void *aio_buf;		/* Location of buffer */
    size_t aio_nbytes;		/* Length of transfer */
    struct sigevent aio_sigevent;	/* Signal number and value */
    struct aiocb *__next_prio;	/* internal, do not use */
    int __abs_prio;		/* internal, do not use */
    int __policy;		/* internal, do not use */
    int __error_code;		/* internal, do not use */
    ssize_t __return_value;	/* internal, do not use */
    off_t aio_offset;		/* File offset */
    char __pad[sizeof(off64_t) - sizeof(off_t)];
    char __unused[32];
};
struct aiocb64 {
    int aio_fildes;		/* File desriptor */
    int aio_lio_opcode;		/* Operation to be performed */
    int aio_reqprio;		/* Request priority offset */
    void *aio_buf;		/* Location of buffer */
    size_t aio_nbytes;		/* Length of transfer */
    struct sigevent aio_sigevent;	/* Signal number and value */
    struct aiocb *__next_prio;	/* internal, do not use */
    int __abs_prio;		/* internal, do not use */
    int __policy;		/* internal, do not use */
    int __error_code;		/* internal, do not use */
    ssize_t __return_value;	/* internal, do not use */
    off64_t aio_offset;		/* File offset */
    char __unused[32];
};
extern int aio_cancel(int fildes, struct aiocb *aiocbp);
extern int aio_cancel64(int fildes, struct aiocb64 *aiocbp);
extern int aio_error(struct aiocb *aiocbp);
extern int aio_error64(struct aiocb64 *aiocbp);
extern int aio_fsync(int operation, struct aiocb *aiocbp);
extern int aio_fsync64(int operation, struct aiocb64 *aiocbp);
extern int aio_read(struct aiocb *aiocbp);
extern int aio_read64(struct aiocb64 *aiocbp);
extern int aio_return(struct aiocb *aiocbp);
extern int aio_return64(struct aiocb64 *aiocbp);
extern int aio_suspend(struct aiocb *list[], int nent,
		       struct timespec *timeout);
extern int aio_suspend64(struct aiocb64 *list[], int nent,
			 struct timespec *timeout);
extern int aio_write(struct aiocb *aiocbp);
extern int aio_write64(struct aiocb64 *aiocbp);
extern int lio_listio(int mode, struct aiocb *list[], int nent,
		      struct sigevent *sig);
extern int lio_listio64(int mode, struct aiocb64 *list[], int nent,
			struct sigevent *sig);

14.19.2. mqueue.h


typedef int mqd_t;
struct mq_attr {
    long int mq_flags;
    long int mq_maxmsg;
    long int mq_msgsize;
    long int mq_curmsgs;
    long int __pad[4];
};
extern int mq_close(mqd_t __mqdes);
extern int mq_getattr(mqd_t __mqdes, struct mq_attr *__mqstat);
extern int mq_notify(mqd_t __mqdes, const struct sigevent *__notification);
extern mqd_t mq_open(const char *__name, int __oflag, ...);
extern ssize_t mq_receive(mqd_t __mqdes, char *__msg_ptr, size_t __msg_len,
			  unsigned int *__msg_prio);
extern int mq_send(mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
		   unsigned int __msg_prio);
extern int mq_setattr(mqd_t __mqdes, const struct mq_attr *__mqstat,
		      struct mq_attr *__omqstat);
extern ssize_t mq_timedreceive(mqd_t __mqdes, char *__msg_ptr,
			       size_t __msg_len, unsigned int *__msg_prio,
			       const struct timespec *__abs_timeout);
extern int mq_timedsend(mqd_t __mqdes, const char *__msg_ptr,
			size_t __msg_len, unsigned int __msg_prio,
			const struct timespec *__abs_timeout);
extern int mq_unlink(const char *__name);