Merge commit '7e3488dc6cdcb0c04e1ce167a1a3bfef83b5f2e0'
[unleashed.git] / include / sys / asynch.h
blob48dc3dc62273c0cf285bf91f65b01b6d9b7a53be
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 (c) 1991 by Sun Microsystems, Inc.
26 #ifndef _SYS_ASYNCH_H
27 #define _SYS_ASYNCH_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/feature_tests.h>
32 #include <sys/types.h>
33 #include <sys/aio.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #define AIO_INPROGRESS -2 /* values not set by the system */
41 /* large file compilation environment setup */
42 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
43 #ifdef __PRAGMA_REDEFINE_EXTNAME
44 #pragma redefine_extname aioread aioread64
45 #pragma redefine_extname aiowrite aiowrite64
46 #else
47 #define aioread aioread64
48 #define aiowrite aiowrite64
49 #endif
50 #endif /* _FILE_OFFSET_BITS */
52 #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
53 #ifdef __PRAGMA_REDEFINE_EXTNAME
54 #pragma redefine_extname aioread64 aioread
55 #pragma redefine_extname aiowrite64 aiowrite
56 #else
57 #define aioread64 aioread
58 #define aiowrite64 aiowrite
59 #endif
60 #endif /* _LP64 && _LARGEFILE64_SOURCE */
61 extern int aioread(int, caddr_t, int, off_t, int, aio_result_t *);
62 extern int aiowrite(int, caddr_t, int, off_t, int, aio_result_t *);
63 extern int aiocancel(aio_result_t *);
64 extern aio_result_t *aiowait(struct timeval *);
66 /* transitional large file interfaces */
67 #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
68 !defined(__PRAGMA_REDEFINE_EXTNAME))
69 extern int aioread64(int, caddr_t, int, off64_t, int, aio_result_t *);
70 extern int aiowrite64(int, caddr_t, int, off64_t, int, aio_result_t *);
71 #endif /* _LARGEFILE64_SOURCE... */
73 #define MAXASYNCHIO 200 /* maxi.number of outstanding i/o's */
75 #ifdef __cplusplus
77 #endif
79 #endif /* _SYS_ASYNCH_H */