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