17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*34709573Sraf * Common Development and Distribution License (the "License"). 6*34709573Sraf * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21*34709573Sraf 227c478bd9Sstevel@tonic-gate /* 23*34709573Sraf * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_AIO_H 287c478bd9Sstevel@tonic-gate #define _SYS_AIO_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifdef __cplusplus 317c478bd9Sstevel@tonic-gate extern "C" { 327c478bd9Sstevel@tonic-gate #endif 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate typedef struct aio_result_t { 357c478bd9Sstevel@tonic-gate ssize_t aio_return; /* return value of read or write */ 367c478bd9Sstevel@tonic-gate int aio_errno; /* errno generated by the IO */ 377c478bd9Sstevel@tonic-gate } aio_result_t; 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 407c478bd9Sstevel@tonic-gate typedef struct aio_result32_t { 417c478bd9Sstevel@tonic-gate int aio_return; /* return value of read or write */ 427c478bd9Sstevel@tonic-gate int aio_errno; /* errno generated by the IO */ 437c478bd9Sstevel@tonic-gate } aio_result32_t; 447c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) 477c478bd9Sstevel@tonic-gate #define AIOREAD 0 /* opcodes for aio calls */ 487c478bd9Sstevel@tonic-gate #define AIOWRITE 1 497c478bd9Sstevel@tonic-gate #define AIOWAIT 2 507c478bd9Sstevel@tonic-gate #define AIOCANCEL 3 517c478bd9Sstevel@tonic-gate #define AIONOTIFY 4 527c478bd9Sstevel@tonic-gate #define AIOINIT 5 537c478bd9Sstevel@tonic-gate #define AIOSTART 6 547c478bd9Sstevel@tonic-gate #define AIOLIO 7 557c478bd9Sstevel@tonic-gate #define AIOSUSPEND 8 567c478bd9Sstevel@tonic-gate #define AIOERROR 9 577c478bd9Sstevel@tonic-gate #define AIOLIOWAIT 10 587c478bd9Sstevel@tonic-gate #define AIOAREAD 11 597c478bd9Sstevel@tonic-gate #define AIOAWRITE 12 60*34709573Sraf #define AIOFSYNC 20 61*34709573Sraf #define AIOWAITN 21 62*34709573Sraf #define AIORESERVED1 23 /* reserved for the aio implementation */ 63*34709573Sraf #define AIORESERVED2 24 64*34709573Sraf #define AIORESERVED3 25 657c478bd9Sstevel@tonic-gate #ifdef _LARGEFILE64_SOURCE 667c478bd9Sstevel@tonic-gate #if defined(_LP64) && !defined(_KERNEL) 677c478bd9Sstevel@tonic-gate #define AIOLIO64 AIOLIO 687c478bd9Sstevel@tonic-gate #define AIOSUSPEND64 AIOSUSPEND 697c478bd9Sstevel@tonic-gate #define AIOERROR64 AIOERROR 707c478bd9Sstevel@tonic-gate #define AIOLIOWAIT64 AIOLIOWAIT 717c478bd9Sstevel@tonic-gate #define AIOAREAD64 AIOAREAD 727c478bd9Sstevel@tonic-gate #define AIOAWRITE64 AIOAWRITE 737c478bd9Sstevel@tonic-gate #define AIOCANCEL64 AIOCANCEL 74*34709573Sraf #define AIOFSYNC64 AIOFSYNC 757c478bd9Sstevel@tonic-gate #else 767c478bd9Sstevel@tonic-gate #define AIOLIO64 13 777c478bd9Sstevel@tonic-gate #define AIOSUSPEND64 14 787c478bd9Sstevel@tonic-gate #define AIOERROR64 15 797c478bd9Sstevel@tonic-gate #define AIOLIOWAIT64 16 807c478bd9Sstevel@tonic-gate #define AIOAREAD64 17 817c478bd9Sstevel@tonic-gate #define AIOAWRITE64 18 827c478bd9Sstevel@tonic-gate #define AIOCANCEL64 19 83*34709573Sraf #define AIOFSYNC64 22 847c478bd9Sstevel@tonic-gate #endif /* defined(_LP64) && !defined(_KERNEL) */ 857c478bd9Sstevel@tonic-gate #endif /* _LARGEFILE64_SOURCE */ 867c478bd9Sstevel@tonic-gate #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate #define AIO_POLL_BIT 0x20 /* opcode filter for AIO_INPROGRESS */ 89*34709573Sraf 907c478bd9Sstevel@tonic-gate #ifdef __cplusplus 917c478bd9Sstevel@tonic-gate } 927c478bd9Sstevel@tonic-gate #endif 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate #endif /* _SYS_AIO_H */ 95