Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

globals.h

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: globals.h,v 12.1 2005/06/16 20:21:47 bostic Exp $
00008  */
00009 
00010 /*******************************************************
00011  * Global variables.
00012  *
00013  * Held in a single structure to minimize the name-space pollution.
00014  *******************************************************/
00015 #ifdef HAVE_VXWORKS
00016 #include "semLib.h"
00017 #endif
00018 
00019 typedef struct __db_globals {
00020 #ifdef HAVE_VXWORKS
00021         u_int32_t db_global_init;       /* VxWorks: inited */
00022         SEM_ID db_global_lock;          /* VxWorks: global semaphore */
00023 #endif
00024                                         /* XA: list of opened environments. */
00025         TAILQ_HEAD(__db_envq, __db_env) db_envq;
00026 
00027         char *db_line;                  /* DB display string. */
00028 
00029         int     (*j_close) __P((int));  /* Underlying OS interface jump table.*/
00030         void    (*j_dirfree) __P((char **, int));
00031         int     (*j_dirlist) __P((const char *, char ***, int *));
00032         int     (*j_exists) __P((const char *, int *));
00033         void    (*j_free) __P((void *));
00034         int     (*j_fsync) __P((int));
00035         int     (*j_ftruncate) __P((int, off_t));
00036         int     (*j_ioinfo) __P((const char *,
00037                     int, u_int32_t *, u_int32_t *, u_int32_t *));
00038         void   *(*j_malloc) __P((size_t));
00039         int     (*j_map) __P((char *, size_t, int, int, void **));
00040         int     (*j_open) __P((const char *, int, ...));
00041         ssize_t (*j_pread) __P((int, void *, size_t, off_t));
00042         ssize_t (*j_pwrite) __P((int, const void *, size_t, off_t));
00043         ssize_t (*j_read) __P((int, void *, size_t));
00044         void   *(*j_realloc) __P((void *, size_t));
00045         int     (*j_rename) __P((const char *, const char *));
00046         int     (*j_seek) __P((int, off_t, int));
00047         int     (*j_sleep) __P((u_long, u_long));
00048         int     (*j_unlink) __P((const char *));
00049         int     (*j_unmap) __P((void *, size_t));
00050         ssize_t (*j_write) __P((int, const void *, size_t));
00051         int     (*j_yield) __P((void));
00052 } DB_GLOBALS;
00053 
00054 #ifdef DB_INITIALIZE_DB_GLOBALS
00055 DB_GLOBALS __db_global_values = {
00056 #ifdef HAVE_VXWORKS
00057         0,                              /* VxWorks: initialized */
00058         NULL,                           /* VxWorks: global semaphore */
00059 #endif
00060                                         /* XA: list of opened environments. */
00061         {NULL, &__db_global_values.db_envq.tqh_first},
00062 
00063         "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=",
00064 
00065         NULL,
00066         NULL,
00067         NULL,
00068         NULL,
00069         NULL,
00070         NULL,
00071         NULL,
00072         NULL,
00073         NULL,
00074         NULL,
00075         NULL,
00076         NULL,
00077         NULL,
00078         NULL,
00079         NULL,
00080         NULL,
00081         NULL,
00082         NULL,
00083         NULL,
00084         NULL,
00085         NULL,
00086         NULL
00087 };
00088 #else
00089 extern  DB_GLOBALS      __db_global_values;
00090 #endif
00091 
00092 #define DB_GLOBAL(v)    __db_global_values.v

Generated on Sun Dec 25 12:14:22 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2