xref: /titanic_51/usr/src/uts/common/sys/asynch.h (revision f841f6ad96ea6675d6c6b35c749eaac601799fdf)
1*f841f6adSraf /*
2*f841f6adSraf  * CDDL HEADER START
3*f841f6adSraf  *
4*f841f6adSraf  * The contents of this file are subject to the terms of the
5*f841f6adSraf  * Common Development and Distribution License, Version 1.0 only
6*f841f6adSraf  * (the "License").  You may not use this file except in compliance
7*f841f6adSraf  * with the License.
8*f841f6adSraf  *
9*f841f6adSraf  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*f841f6adSraf  * or http://www.opensolaris.org/os/licensing.
11*f841f6adSraf  * See the License for the specific language governing permissions
12*f841f6adSraf  * and limitations under the License.
13*f841f6adSraf  *
14*f841f6adSraf  * When distributing Covered Code, include this CDDL HEADER in each
15*f841f6adSraf  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*f841f6adSraf  * If applicable, add the following below this CDDL HEADER, with the
17*f841f6adSraf  * fields enclosed by brackets "[]" replaced with your own identifying
18*f841f6adSraf  * information: Portions Copyright [yyyy] [name of copyright owner]
19*f841f6adSraf  *
20*f841f6adSraf  * CDDL HEADER END
21*f841f6adSraf  */
22*f841f6adSraf /*
23*f841f6adSraf  * Copyright (c) 1991 by Sun Microsystems, Inc.
24*f841f6adSraf  */
25*f841f6adSraf 
26*f841f6adSraf #ifndef _SYS_ASYNCH_H
27*f841f6adSraf #define	_SYS_ASYNCH_H
28*f841f6adSraf 
29*f841f6adSraf #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*f841f6adSraf 
31*f841f6adSraf #include <sys/feature_tests.h>
32*f841f6adSraf #include <sys/types.h>
33*f841f6adSraf #include <sys/aio.h>
34*f841f6adSraf 
35*f841f6adSraf #ifdef	__cplusplus
36*f841f6adSraf extern "C" {
37*f841f6adSraf #endif
38*f841f6adSraf 
39*f841f6adSraf #define	AIO_INPROGRESS	-2	/* values not set by the system */
40*f841f6adSraf 
41*f841f6adSraf /* large file compilation environment setup */
42*f841f6adSraf #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
43*f841f6adSraf #ifdef __PRAGMA_REDEFINE_EXTNAME
44*f841f6adSraf #pragma redefine_extname	aioread		aioread64
45*f841f6adSraf #pragma redefine_extname	aiowrite	aiowrite64
46*f841f6adSraf #else
47*f841f6adSraf #define	aioread			aioread64
48*f841f6adSraf #define	aiowrite		aiowrite64
49*f841f6adSraf #endif
50*f841f6adSraf #endif /* _FILE_OFFSET_BITS */
51*f841f6adSraf 
52*f841f6adSraf #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
53*f841f6adSraf #ifdef __PRAGMA_REDEFINE_EXTNAME
54*f841f6adSraf #pragma	redefine_extname	aioread64	aioread
55*f841f6adSraf #pragma	redefine_extname	aiowrite64	aiowrite
56*f841f6adSraf #else
57*f841f6adSraf #define	aioread64	aioread
58*f841f6adSraf #define	aiowrite64	aiowrite
59*f841f6adSraf #endif
60*f841f6adSraf #endif	/* _LP64 && _LARGEFILE64_SOURCE */
61*f841f6adSraf extern int aioread(int, caddr_t, int, off_t, int, aio_result_t *);
62*f841f6adSraf extern int aiowrite(int, caddr_t, int, off_t, int, aio_result_t *);
63*f841f6adSraf extern int aiocancel(aio_result_t *);
64*f841f6adSraf extern aio_result_t *aiowait(struct timeval *);
65*f841f6adSraf 
66*f841f6adSraf /* transitional large file interfaces */
67*f841f6adSraf #if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
68*f841f6adSraf 	    !defined(__PRAGMA_REDEFINE_EXTNAME))
69*f841f6adSraf extern int aioread64(int, caddr_t, int, off64_t, int, aio_result_t *);
70*f841f6adSraf extern int aiowrite64(int, caddr_t, int, off64_t, int, aio_result_t *);
71*f841f6adSraf #endif	/* _LARGEFILE64_SOURCE... */
72*f841f6adSraf 
73*f841f6adSraf #define	MAXASYNCHIO 200		/* maxi.number of outstanding i/o's */
74*f841f6adSraf 
75*f841f6adSraf #ifdef	__cplusplus
76*f841f6adSraf }
77*f841f6adSraf #endif
78*f841f6adSraf 
79*f841f6adSraf #endif /* _SYS_ASYNCH_H */
80