Merge illumos-gate
[unleashed/lotheac.git] / include / aio.h
blob9a2d1acd6a3e6d2766ba29de79ebb49c36e9ee94
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 #ifndef _AIO_H
30 #define _AIO_H
32 #include <sys/feature_tests.h>
33 #include <sys/types.h>
34 #include <sys/fcntl.h>
35 #include <sys/siginfo.h>
36 #include <sys/aiocb.h>
37 #include <time.h>
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
43 #if (_POSIX_C_SOURCE - 0 > 0) && (_POSIX_C_SOURCE - 0 <= 2)
44 #error "POSIX Asynchronous I/O is not supported in POSIX.1-1990"
45 #endif
48 * function prototypes
50 extern int aio_read(aiocb_t *);
51 extern int aio_write(aiocb_t *);
52 extern int lio_listio(int,
53 aiocb_t *_RESTRICT_KYWD const *_RESTRICT_KYWD,
54 int, struct sigevent *_RESTRICT_KYWD);
55 extern int aio_error(const aiocb_t *);
56 extern ssize_t aio_return(aiocb_t *);
57 extern int aio_cancel(int, aiocb_t *);
58 extern int aio_suspend(const aiocb_t *const[], int,
59 const struct timespec *);
60 extern int aio_fsync(int, aiocb_t *);
61 extern int aio_waitn(aiocb_t *[], uint_t, uint_t *,
62 const struct timespec *);
64 #ifdef __cplusplus
66 #endif
68 #endif /* _AIO_H */