1*0Sstevel@tonic-gate /*- 2*0Sstevel@tonic-gate * See the file LICENSE for redistribution information. 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * Copyright (c) 1997, 1998 5*0Sstevel@tonic-gate * Sleepycat Software. All rights reserved. 6*0Sstevel@tonic-gate * 7*0Sstevel@tonic-gate * @(#)os.h 10.11 (Sleepycat) 10/12/98 8*0Sstevel@tonic-gate */ 9*0Sstevel@tonic-gate 10*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gate /* 13*0Sstevel@tonic-gate * We group seek/write calls into a single function so that we can use 14*0Sstevel@tonic-gate * pread(2)/pwrite(2) where they're available. 15*0Sstevel@tonic-gate */ 16*0Sstevel@tonic-gate #define DB_IO_READ 1 17*0Sstevel@tonic-gate #define DB_IO_WRITE 2 18*0Sstevel@tonic-gate typedef struct __io { 19*0Sstevel@tonic-gate int fd_io; /* I/O file descriptor. */ 20*0Sstevel@tonic-gate int fd_lock; /* Locking file descriptor. */ 21*0Sstevel@tonic-gate db_mutex_t *mutexp; /* Mutex to lock. */ 22*0Sstevel@tonic-gate size_t pagesize; /* Page size. */ 23*0Sstevel@tonic-gate db_pgno_t pgno; /* Page number. */ 24*0Sstevel@tonic-gate u_int8_t *buf; /* Buffer. */ 25*0Sstevel@tonic-gate size_t bytes; /* Bytes read/written. */ 26*0Sstevel@tonic-gate } DB_IO; 27