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