10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*1885Sraf * Common Development and Distribution License (the "License"). 6*1885Sraf * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 21*1885Sraf 220Sstevel@tonic-gate /* 23*1885Sraf * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_AIO_H 280Sstevel@tonic-gate #define _SYS_AIO_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 360Sstevel@tonic-gate typedef struct aio_result_t { 37*1885Sraf ssize_t aio_return; /* return value of read or write */ 380Sstevel@tonic-gate int aio_errno; /* errno generated by the IO */ 390Sstevel@tonic-gate } aio_result_t; 400Sstevel@tonic-gate 410Sstevel@tonic-gate #ifdef _SYSCALL32 420Sstevel@tonic-gate typedef struct aio_result32_t { 430Sstevel@tonic-gate int aio_return; /* return value of read or write */ 440Sstevel@tonic-gate int aio_errno; /* errno generated by the IO */ 450Sstevel@tonic-gate } aio_result32_t; 460Sstevel@tonic-gate #endif /* _SYSCALL32 */ 470Sstevel@tonic-gate 480Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) 490Sstevel@tonic-gate #define AIOREAD 0 /* opcodes for aio calls */ 500Sstevel@tonic-gate #define AIOWRITE 1 510Sstevel@tonic-gate #define AIOWAIT 2 520Sstevel@tonic-gate #define AIOCANCEL 3 530Sstevel@tonic-gate #define AIONOTIFY 4 540Sstevel@tonic-gate #define AIOINIT 5 550Sstevel@tonic-gate #define AIOSTART 6 560Sstevel@tonic-gate #define AIOLIO 7 570Sstevel@tonic-gate #define AIOSUSPEND 8 580Sstevel@tonic-gate #define AIOERROR 9 590Sstevel@tonic-gate #define AIOLIOWAIT 10 600Sstevel@tonic-gate #define AIOAREAD 11 610Sstevel@tonic-gate #define AIOAWRITE 12 62*1885Sraf #define AIOFSYNC 20 63*1885Sraf #define AIOWAITN 21 64*1885Sraf #define AIORESERVED1 23 /* reserved for the aio implementation */ 65*1885Sraf #define AIORESERVED2 24 66*1885Sraf #define AIORESERVED3 25 670Sstevel@tonic-gate #ifdef _LARGEFILE64_SOURCE 680Sstevel@tonic-gate #if defined(_LP64) && !defined(_KERNEL) 690Sstevel@tonic-gate #define AIOLIO64 AIOLIO 700Sstevel@tonic-gate #define AIOSUSPEND64 AIOSUSPEND 710Sstevel@tonic-gate #define AIOERROR64 AIOERROR 720Sstevel@tonic-gate #define AIOLIOWAIT64 AIOLIOWAIT 730Sstevel@tonic-gate #define AIOAREAD64 AIOAREAD 740Sstevel@tonic-gate #define AIOAWRITE64 AIOAWRITE 750Sstevel@tonic-gate #define AIOCANCEL64 AIOCANCEL 76*1885Sraf #define AIOFSYNC64 AIOFSYNC 770Sstevel@tonic-gate #else 780Sstevel@tonic-gate #define AIOLIO64 13 790Sstevel@tonic-gate #define AIOSUSPEND64 14 800Sstevel@tonic-gate #define AIOERROR64 15 810Sstevel@tonic-gate #define AIOLIOWAIT64 16 820Sstevel@tonic-gate #define AIOAREAD64 17 830Sstevel@tonic-gate #define AIOAWRITE64 18 840Sstevel@tonic-gate #define AIOCANCEL64 19 85*1885Sraf #define AIOFSYNC64 22 860Sstevel@tonic-gate #endif /* defined(_LP64) && !defined(_KERNEL) */ 870Sstevel@tonic-gate #endif /* _LARGEFILE64_SOURCE */ 880Sstevel@tonic-gate #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ 890Sstevel@tonic-gate 900Sstevel@tonic-gate #define AIO_POLL_BIT 0x20 /* opcode filter for AIO_INPROGRESS */ 91*1885Sraf 920Sstevel@tonic-gate #ifdef __cplusplus 930Sstevel@tonic-gate } 940Sstevel@tonic-gate #endif 950Sstevel@tonic-gate 960Sstevel@tonic-gate #endif /* _SYS_AIO_H */ 97