xref: /titanic_52/usr/src/cmd/sendmail/db/include/os.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
11 
12 /*
13  * We group seek/write calls into a single function so that we can use
14  * pread(2)/pwrite(2) where they're available.
15  */
16 #define	DB_IO_READ	1
17 #define	DB_IO_WRITE	2
18 typedef struct __io {
19 	int	    fd_io;		/* I/O file descriptor. */
20 	int	    fd_lock;		/* Locking file descriptor. */
21 	db_mutex_t *mutexp;		/* Mutex to lock. */
22 	size_t	    pagesize;		/* Page size. */
23 	db_pgno_t   pgno;		/* Page number. */
24 	u_int8_t   *buf;		/* Buffer. */
25 	size_t	    bytes;		/* Bytes read/written. */
26 } DB_IO;
27