00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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;
00022 SEM_ID db_global_lock;
00023 #endif
00024
00025 TAILQ_HEAD(__db_envq, __db_env) db_envq;
00026
00027 char *db_line;
00028
00029 int (*j_close) __P((int));
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,
00058 NULL,
00059 #endif
00060
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