os.h

Go to the documentation of this file.
00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1997, 1998, 1999, 2000
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: os_8h-source.html,v 1.1 2008/06/08 10:21:04 sebdiaz Exp $
00008  */
00009 
00010 #if defined(__cplusplus)
00011 extern "C" {
00012 #endif
00013 /*
00014  * Filehandle.
00015  */
00016 struct __fh_t {
00017 #if defined(_WIN32)
00018         HANDLE    handle;               /* Windows/32 file handle. */
00019 #endif
00020         int       fd;                   /* POSIX file descriptor. */
00021 
00022         u_int32_t log_size;             /* XXX: Log file size. */
00023 
00024 #define DB_FH_NOSYNC    0x01            /* Handle doesn't need to be sync'd. */
00025 #define DB_FH_VALID     0x02            /* Handle is valid. */
00026         u_int8_t flags;
00027 };
00028 
00029 /*
00030  * We group certain seek/write calls into a single function so that we
00031  * can use pread(2)/pwrite(2) where they're available.
00032  */
00033 #define DB_IO_READ      1
00034 #define DB_IO_WRITE     2
00035 typedef struct __io_t {
00036         DB_FH     *fhp;                 /* I/O file handle. */
00037         MUTEX     *mutexp;              /* Mutex to lock. */
00038         size_t     pagesize;            /* Page size. */
00039         db_pgno_t  pgno;                /* Page number. */
00040         u_int8_t  *buf;                 /* Buffer. */
00041         size_t     bytes;               /* Bytes read/written. */
00042 } DB_IO;
00043 
00044 #if defined(__cplusplus)
00045 }
00046 #endif

Generated on Sun Jun 8 10:56:38 2008 for GNUmifluz by  doxygen 1.5.5