X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..c18c124eaa464aaaa5549e99e5a70fc9cbb50944:/bsd/sys/aio.h diff --git a/bsd/sys/aio.h b/bsd/sys/aio.h index 90fdbe6e2..7a887288f 100644 --- a/bsd/sys/aio.h +++ b/bsd/sys/aio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2003-2006 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -38,38 +38,77 @@ #define _SYS_AIO_H_ #include +#include #include +/* + * [XSI] Inclusion of the header may make visible symbols defined + * in the headers , , , and . + * + * In our case, this is limited to struct timespec, off_t and ssize_t. + */ +#include +#ifdef KERNEL +#include +#include +#endif /* KERNEL */ + +#include +#include + +/* + * A aio_fsync() options that the calling thread is to continue execution + * while the lio_listio() operation is being performed, and no notification + * is given when the operation is complete + * + * [XSI] from + */ +#include +#include + +#ifndef KERNEL struct aiocb { - int aio_fildes; /* File descriptor */ - off_t aio_offset; /* File offset */ - volatile void *aio_buf; /* Location of buffer */ - size_t aio_nbytes; /* Length of transfer */ - int aio_reqprio; /* Request priority offset */ - struct sigevent aio_sigevent; /* Signal number and value */ - int aio_lio_opcode; /* Operation to be performed */ + int aio_fildes; /* File descriptor */ + off_t aio_offset; /* File offset */ + volatile void *aio_buf; /* Location of buffer */ + size_t aio_nbytes; /* Length of transfer */ + int aio_reqprio; /* Request priority offset */ + struct sigevent aio_sigevent; /* Signal number and value */ + int aio_lio_opcode; /* Operation to be performed */ }; +#endif /* KERNEL */ -// LP64todo - should this move? #ifdef KERNEL -#if __DARWIN_ALIGN_NATURAL -#pragma options align=natural -#endif - struct user_aiocb { - int aio_fildes; /* File descriptor */ - off_t aio_offset; /* File offset */ - user_addr_t aio_buf; /* Location of buffer */ - user_size_t aio_nbytes; /* Length of transfer */ - int aio_reqprio; /* Request priority offset */ + int aio_fildes; /* File descriptor */ + off_t aio_offset; /* File offset */ + user_addr_t aio_buf; /* Location of buffer */ + user_size_t aio_nbytes; /* Length of transfer */ + int aio_reqprio; /* Request priority offset */ struct user_sigevent aio_sigevent; /* Signal number and value */ - int aio_lio_opcode; /* Operation to be performed */ + int aio_lio_opcode; /* Operation to be performed */ +}; + +struct user64_aiocb { + int aio_fildes; /* File descriptor */ + user64_off_t aio_offset; /* File offset */ + user64_addr_t aio_buf; /* Location of buffer */ + user64_size_t aio_nbytes; /* Length of transfer */ + int aio_reqprio; /* Request priority offset */ + struct user64_sigevent aio_sigevent; /* Signal number and value */ + int aio_lio_opcode; /* Operation to be performed */ }; -#if __DARWIN_ALIGN_NATURAL -#pragma options align=reset -#endif +struct user32_aiocb { + int aio_fildes; /* File descriptor */ + user32_off_t aio_offset; /* File offset */ + user32_addr_t aio_buf; /* Location of buffer */ + user32_size_t aio_nbytes; /* Length of transfer */ + int aio_reqprio; /* Request priority offset */ + struct user32_sigevent aio_sigevent; /* Signal number and value */ + int aio_lio_opcode; /* Operation to be performed */ +}; #endif // KERNEL @@ -125,19 +164,6 @@ struct user_aiocb { */ #define AIO_LISTIO_MAX 16 -/* - * A aio_fsync() options - * that the calling thread is to continue execution while - * the lio_listio() operation is being performed, and no - * notification is given when the operation is complete - */ - -#ifndef O_SYNC /* XXX investigate documentation error */ -#define O_SYNC 0x0080 /* queued IO is completed as if by fsync() */ -#endif -#if 0 /* O_DSYNC - NOT SUPPORTED */ -#define O_DSYNC 0x1 /* queued async IO is completed as if by fdatasync() */ -#endif #ifndef KERNEL /* @@ -229,7 +255,7 @@ ssize_t aio_return( struct aiocb * aiocbp ); */ int aio_suspend( const struct aiocb *const aiocblist[], int nent, - const struct timespec * timeoutp ); + const struct timespec * timeoutp ) __DARWIN_ALIAS_C(aio_suspend); /* * Write aiocbp->aio_nbytes to the file associated with aiocbp->aio_fildes from