diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-12-01 17:16:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-12-01 17:16:22 +0000 |
commit | 04be94a87d0a74c022490db7f4f926253f0d69d3 (patch) | |
tree | aed47130338b81c2af8e92849ed1429596adeca3 /db2/include | |
parent | f4017d205738b913f1002433cde5d4b4e93fbd81 (diff) | |
download | glibc-04be94a87d0a74c022490db7f4f926253f0d69d3.tar.gz glibc-04be94a87d0a74c022490db7f4f926253f0d69d3.tar.xz glibc-04be94a87d0a74c022490db7f4f926253f0d69d3.zip |
Update. cvs/libc-ud-971201
1997-12-01 17:27 Ulrich Drepper <drepper@cygnus.com> * Makefile (subdirs): Add iconvdata and localedata. * iconv/gconv.h: Define UNKNOWN_10646_CHAR as error value. * iconv/gconv_conf.c (read_conf_file): Little optimization. * iconvdata/8bit-gap.c: New file. * iconvdata/8bit-generic.c: Renamed from ... * iconvdata/iso8859-generic.c: ...this. * iconvdata/configure: Removed. * iconvdata/Makefile: Add new modules and better rules. * iconvdata/iso6937.c: Minor bug fixes. * iconvdata/iso8859-1.c: Likewise. * iconvdata/t61.c: Likewise. * iconvdata/iso8859-2.c: Change to use 8bit-generic.c. Minor bug fixes. * iconvdata/iso8859-3.c: Likewise. * iconvdata/iso8859-4.c: Likewise. * iconvdata/iso8859-5.c: Likewise. * iconvdata/iso8859-6.c: Likewise. * iconvdata/iso8859-7.c: Likewise. * iconvdata/iso8859-8.c: Likewise. * iconvdata/iso8859-9.c: Likewise. * iconvdata/iso8859-10.c: Likewise. * iconvdata/ebcdic-at-de-a.c: New file. * iconvdata/ebcdic-at-de.c: New file. * iconvdata/ebcdic-ca-fr.c: New file. * iconvdata/hp-roman8.c: New file. * iconvdata/koi-8.c: New file. * iconvdata/koi8-r.c: New file. * iconvdata/koi8-h.c: New file. * iconvdata/latin-greek-1.c: New file. * iconvdata/latin-greek-1.h: New file. * iconvdata/latin-greek.c: New file. * iconvdata/latin-greek.h: New file. * iconvdata/jis0201.c: New file. * iconvdata/jis0201.h: New file. * iconvdata/jis0208.c: New file. * iconvdata/jis0208.h: New file. * iconvdata/jis0212.c: New file. * iconvdata/jis0212.h: New file. * iconvdata/sjis.c: New file. * iconvdata/gap.pl: New file. Script to generate table header. * iconvdata/gaptab.pl: New file. * iconvdata/gconv-modules: Add info about new modules. * locale/programs/charmap.c: Also examine alias names given in charmap files. * localedata/*: Add to here from add-on. We need the information to generate tables for iconv. Update from db-2.3.14. * db2/Makefile: Updated. * db2/config.h: Likewise. * db2/db.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_err.c: Likewise. * db2/common/db_region.c: Likewise. * db2/db/db_auto.c: Likewise. * db2/db/db_dispatch.c: Likewise. * db2/db/db_ret.c: Likewise. * db2/dbm/dbm.c: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/lock.h: Likewise. * db2/include/log.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/os_func.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_region.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/README: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/os_open.c: Likewise. * db2/os/os_func.c: Removed. * db2/os/os_config.c: New file. * db2/os/os_spin.c: New file. * db2/txn/txn.c: Likewise. * db2/txn/txn_auto.c: Likewise. 1997-11-30 06:01 Ulrich Drepper <drepper@cygnus.com> * posix/sys/wait.h (__WAIT_INT): Don't use complex version with __typeof for C++ since this fails for class members. Reported by Neal Becker <neal@ctd.comsat.com>. 1997-11-28 11:21 Zack Weinberg <zack@rabi.phys.columbia.edu> * configure.in: Check for a working makeinfo (3.11 or better). * config.make.in: Add MAKEINFO to be substituted. * manual/Makefile: Don't update info if makeinfo is too old. 1997-11-30 05:21 Ulrich Drepper <drepper@cygnus.com> * sysdeps/alpha/setjmp.S: Define _ASM and _SETJMP_H to get definitions. * sysdeps/alpha/__longjmp.S: Likewise. * sysdeps/unix/sysv/linux/alpha/kernel_termios.h: Include <termios.h> not <bits/termios.h>. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Define syscall as __llseek and make llseek and lseek64 weak aliases. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. Patches by a sun <asun@zoology.washington.edu>. 1997-11-29 19:19 Zack Weinberg <zack@rabi.phys.columbia.edu> * misc/sys/syslog.h: Delete KERNEL preprocessor conditional. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. * misc/sys/syslog.h: Clean up BSD header. 1997-11-29 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/bits/in.h: Add changes from Linux 2.1.67. * sysdeps/libm-ieee754/s_ctan.c (__ctan): Raise invalid exception for ctan(+-inf,x). * sysdeps/libm-ieee754/s_ctanl.c (__ctanl): Likewise. * sysdeps/libm-ieee754/s_ctanf.c (__ctanf): Likewise. * math/libm-test.c (csqrt_test): Add tests for cabs, carg, ctan, csqrt (-1), ctanh(i*pi/4). 1997-11-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/bits/confname.h: Fix comma in enumerator. 1997-11-28 13:28 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/net/if_arp.h: Add more ARPHRD_ constants. 1997-11-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * wcsmbs/wcrtomb.c (__wcrtomb): Remove unused variable fake. 1997-11-26 21:28 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/getcwd.c (GETCWD_STORYGE_CLASS): Remove definition and use. Define GETCWD_RETURN_TYPE instead and use it. * sysdeps/unix/sysv/linux/getcwd.c: Define GETCWD_RETURN_TYPE instead of GETCWD_STORYGE_CLASS and put the return type and the `internal_function' in the right order for gcc 2.7.2. 1997-11-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/sys/module.h: Remove file. It's incompatible with Linux 2.1.x. Packages using modules (e.g. modutils) should/do provide their own version. Suggested by Richard Henderson. * sysdeps/unix/sysv/linux/Dist: Remove sys/module.h. * sysdeps/unix/sysv/linux/Makefile (sysdep_headers) [$(subdir)=socket]: Remove sys/module.h. * libio/stdio.h: Correct comment of sys_nerr/sys_errlist.
Diffstat (limited to 'db2/include')
-rw-r--r-- | db2/include/btree_ext.h | 2 | ||||
-rw-r--r-- | db2/include/common_ext.h | 2 | ||||
-rw-r--r-- | db2/include/db.h.src | 54 | ||||
-rw-r--r-- | db2/include/db_cxx.h | 4 | ||||
-rw-r--r-- | db2/include/db_ext.h | 1 | ||||
-rw-r--r-- | db2/include/db_int.h.src | 3 | ||||
-rw-r--r-- | db2/include/lock.h | 8 | ||||
-rw-r--r-- | db2/include/log.h | 23 | ||||
-rw-r--r-- | db2/include/mp.h | 23 | ||||
-rw-r--r-- | db2/include/mp_ext.h | 6 | ||||
-rw-r--r-- | db2/include/os_ext.h | 4 | ||||
-rw-r--r-- | db2/include/os_func.h | 6 |
12 files changed, 91 insertions, 45 deletions
diff --git a/db2/include/btree_ext.h b/db2/include/btree_ext.h index bbe0d971b2..46f2227bdd 100644 --- a/db2/include/btree_ext.h +++ b/db2/include/btree_ext.h @@ -11,7 +11,7 @@ int __bam_cursor __P((DB *, DB_TXN *, DBC **)); int __bam_c_iclose __P((DB *, DBC *)); int __bam_get __P((DB *, DB_TXN *, DBT *, DBT *, int)); int __bam_ovfl_chk __P((DB *, CURSOR *, u_int32_t, int)); -int __bam_ca_delete __P((DB *, db_pgno_t, u_int32_t, CURSOR *)); +int __bam_ca_delete __P((DB *, db_pgno_t, u_int32_t, CURSOR *, int)); void __bam_ca_di __P((DB *, db_pgno_t, u_int32_t, int)); void __bam_ca_dup __P((DB *, db_pgno_t, u_int32_t, u_int32_t, db_pgno_t, u_int32_t)); diff --git a/db2/include/common_ext.h b/db2/include/common_ext.h index b814582abd..29bc9aa4e2 100644 --- a/db2/include/common_ext.h +++ b/db2/include/common_ext.h @@ -23,7 +23,7 @@ int __db_syncchk __P((const DB *, int)); int __db_ferr __P((const DB_ENV *, const char *, int)); u_int32_t __db_log2 __P((u_int32_t)); int __db_rcreate __P((DB_ENV *, APPNAME, - const char *, const char *, int, size_t, int *, void *)); + const char *, const char *, int, size_t, int, int *, void *)); int __db_rinit __P((DB_ENV *, RLAYOUT *, int, size_t, int)); int __db_ropen __P((DB_ENV *, APPNAME, const char *, const char *, int, int *, void *)); diff --git a/db2/include/db.h.src b/db2/include/db.h.src index 3cc2bfd4fc..654eb16425 100644 --- a/db2/include/db.h.src +++ b/db2/include/db.h.src @@ -4,7 +4,7 @@ * Copyright (c) 1996, 1997 * Sleepycat Software. All rights reserved. * - * @(#)db.h.src 10.91 (Sleepycat) 11/3/97 + * @(#)db.h.src 10.97 (Sleepycat) 11/28/97 */ #ifndef _DB_H_ @@ -73,8 +73,8 @@ #define DB_VERSION_MAJOR 2 #define DB_VERSION_MINOR 3 -#define DB_VERSION_PATCH 12 -#define DB_VERSION_STRING "Sleepycat Software: DB 2.3.12: (11/3/97)" +#define DB_VERSION_PATCH 14 +#define DB_VERSION_STRING "Sleepycat Software: DB 2.3.14: (11/28/97)" typedef u_int32_t db_pgno_t; /* Page number type. */ typedef u_int16_t db_indx_t; /* Page offset type. */ @@ -129,8 +129,10 @@ struct __db_dbt { }; /* - * DB configuration. There are a set of functions which the application - * can replace with its own versions. + * DB internal configuration. + * + * There are a set of functions that the application can replace with its + * own versions, and some other knobs which can be turned at run-time. */ #define DB_FUNC_CALLOC 1 /* ANSI C calloc. */ #define DB_FUNC_CLOSE 2 /* POSIX 1003.1 close. */ @@ -147,11 +149,12 @@ struct __db_dbt { #define DB_FUNC_REALLOC 13 /* ANSI C realloc. */ #define DB_FUNC_SEEK 14 /* POSIX 1003.1 lseek. */ #define DB_FUNC_SLEEP 15 /* DB: sleep secs/usecs. */ -#define DB_FUNC_STRDUP 16 /* ANSI C strdup. */ +#define DB_FUNC_STRDUP 16 /* DB: strdup(3). */ #define DB_FUNC_UNLINK 17 /* POSIX 1003.1 unlink. */ #define DB_FUNC_UNMAP 18 /* DB: unmap shared memory file. */ #define DB_FUNC_WRITE 19 /* POSIX 1003.1 write. */ #define DB_FUNC_YIELD 20 /* DB: yield thread to scheduler. */ +#define DB_TSL_SPINS 21 /* DB: initialize spin count. */ /* * Database configuration and initialization. @@ -211,10 +214,10 @@ struct __db_dbt { * locking subsystem. */ #define DB_LOCK_NORUN 0x0 -#define DB_LOCK_DEFAULT 0x1 -#define DB_LOCK_OLDEST 0x2 -#define DB_LOCK_RANDOM 0x3 -#define DB_LOCK_YOUNGEST 0x4 +#define DB_LOCK_DEFAULT 0x1 /* Default policy. */ +#define DB_LOCK_OLDEST 0x2 /* Abort oldest transaction. */ +#define DB_LOCK_RANDOM 0x3 /* Abort random transaction. */ +#define DB_LOCK_YOUNGEST 0x4 /* Abort youngest transaction. */ struct __db_env { int db_lorder; /* Byte order. */ @@ -265,6 +268,10 @@ struct __db_env { /******************************************************* * Access methods. *******************************************************/ +/* + * XXX + * Changes here must be reflected in java/src/com/sleepycat/db/Db.java. + */ typedef enum { DB_BTREE=1, /* B+tree. */ DB_HASH, /* Extended Linear Hashing. */ @@ -347,7 +354,13 @@ struct __db_info { #define DB_SET_RANGE 0x020000 /* c_get() */ #define DB_SET_RECNO 0x040000 /* c_get() */ -/* DB (user visible) error return codes. */ +/* + * DB (user visible) error return codes. + * + * XXX + * Changes to any of the user visible error return codes must be reflected + * in java/src/com/sleepycat/db/Db.java. + */ #define DB_INCOMPLETE ( -1) /* Sync didn't finish. */ #define DB_KEYEMPTY ( -2) /* The key/data pair was deleted or was never created by the user. */ @@ -516,6 +529,7 @@ int db_appinit __P((const char *, char * const *, DB_ENV *, int)); int db_appexit __P((DB_ENV *)); int db_jump_set __P((void *, int)); int db_open __P((const char *, DBTYPE, int, int, DB_ENV *, DB_INFO *, DB **)); +int db_value_set __P((int, int)); char *db_version __P((int *, int *, int *)); #if defined(__cplusplus) }; @@ -533,16 +547,26 @@ char *db_version __P((int *, int *, int *)); /* Flag values for lock_detect(). */ #define DB_LOCK_CONFLICT 0x01 /* Run on any conflict. */ -/* Request types. */ +/* + * Request types. + * + * XXX + * Changes here must be reflected in java/src/com/sleepycat/db/Db.java. + */ typedef enum { - DB_LOCK_DUMP, /* Display held locks. */ + DB_LOCK_DUMP=0, /* Display held locks. */ DB_LOCK_GET, /* Get the lock. */ DB_LOCK_PUT, /* Release the lock. */ DB_LOCK_PUT_ALL, /* Release locker's locks. */ DB_LOCK_PUT_OBJ /* Release locker's locks on obj. */ } db_lockop_t; -/* Simple R/W lock modes and for multi-granularity intention locking. */ +/* + * Simple R/W lock modes and for multi-granularity intention locking. + * + * XXX + * Changes here must be reflected in java/src/com/sleepycat/db/Db.java. + */ typedef enum { DB_LOCK_NG=0, /* Not granted. */ DB_LOCK_READ, /* Shared/read. */ @@ -577,7 +601,7 @@ extern const u_int8_t db_riw_conflicts[]; extern "C" { #endif int lock_close __P((DB_LOCKTAB *)); -int lock_detect __P((DB_LOCKTAB *, int, u_int32_t)); +int lock_detect __P((DB_LOCKTAB *, int, int)); int lock_get __P((DB_LOCKTAB *, u_int32_t, int, const DBT *, db_lockmode_t, DB_LOCK *)); int lock_id __P((DB_LOCKTAB *, u_int32_t *)); diff --git a/db2/include/db_cxx.h b/db2/include/db_cxx.h index 01d1231092..83523c5559 100644 --- a/db2/include/db_cxx.h +++ b/db2/include/db_cxx.h @@ -4,7 +4,7 @@ * Copyright (c) 1997 * Sleepycat Software. All rights reserved. * - * @(#)db_cxx.h 10.12 (Sleepycat) 10/25/97 + * @(#)db_cxx.h 10.13 (Sleepycat) 11/25/97 */ #ifndef _DB_CXX_H_ @@ -202,7 +202,7 @@ class _exported DbLockTab friend DbEnv; public: int close(); - int detect(int atype, u_int32_t flags); + int detect(int flags, int atype); int get(u_int32_t locker, int flags, const Dbt *obj, db_lockmode_t lock_mode, DbLock *lock); int id(u_int32_t *idp); diff --git a/db2/include/db_ext.h b/db2/include/db_ext.h index f9b3b3a214..15eeaf50a3 100644 --- a/db2/include/db_ext.h +++ b/db2/include/db_ext.h @@ -65,6 +65,7 @@ int __db_add_recovery __P((DB_ENV *, int __db_txnlist_init __P((void *)); int __db_txnlist_add __P((void *, u_int32_t)); int __db_txnlist_find __P((void *, u_int32_t)); +void __db_txnlist_end __P((void *)); int __db_dput __P((DB *, DBT *, PAGE **, db_indx_t *, int (*)(DB *, u_int32_t, PAGE **))); int __db_drem __P((DB *, diff --git a/db2/include/db_int.h.src b/db2/include/db_int.h.src index abd93a6e8e..03a882fded 100644 --- a/db2/include/db_int.h.src +++ b/db2/include/db_int.h.src @@ -4,7 +4,7 @@ * Copyright (c) 1996, 1997 * Sleepycat Software. All rights reserved. * - * @(#)db_int.h.src 10.36 (Sleepycat) 10/31/97 + * @(#)db_int.h.src 10.37 (Sleepycat) 11/25/97 */ #ifndef _DB_INTERNAL_H_ @@ -168,6 +168,7 @@ typedef struct _db_mutex_t { off_t off; /* Backing file offset. */ u_long pid; /* Lock holder: 0 or process pid. */ #endif + u_int32_t spins; /* Spins before block. */ u_int32_t mutex_set_wait; /* Granted after wait. */ u_int32_t mutex_set_nowait; /* Granted without waiting. */ } db_mutex_t; diff --git a/db2/include/lock.h b/db2/include/lock.h index 8a927f076e..5031b65d06 100644 --- a/db2/include/lock.h +++ b/db2/include/lock.h @@ -4,7 +4,7 @@ * Copyright (c) 1996, 1997 * Sleepycat Software. All rights reserved. * - * @(#)lock.h 10.9 (Sleepycat) 10/25/97 + * @(#)lock.h 10.10 (Sleepycat) 11/13/97 */ typedef struct __db_lockobj DB_LOCKOBJ; @@ -85,10 +85,14 @@ struct __db_lockobj { } dlinks; #define DB_LOCK_OBJTYPE 1 #define DB_LOCK_LOCKER 2 + /* Allocate room in the object to + * hold typical DB lock structures + * so that we do not have to + * allocate them from shalloc. */ + u_int8_t objdata[sizeof(struct __db_ilock)]; u_int8_t type; /* Real object or locker id. */ }; - #define dd_id wlinks._dd_id #define waiters wlinks._waiters #define holders dlinks._holders diff --git a/db2/include/log.h b/db2/include/log.h index a192a38136..405daf4148 100644 --- a/db2/include/log.h +++ b/db2/include/log.h @@ -4,7 +4,7 @@ * Copyright (c) 1996, 1997 * Sleepycat Software. All rights reserved. * - * @(#)log.h 10.15 (Sleepycat) 11/2/97 + * @(#)log.h 10.16 (Sleepycat) 11/9/97 */ #ifndef _LOG_H_ @@ -117,20 +117,35 @@ struct __log { SH_TAILQ_HEAD(__fq) fq; /* List of file names. */ + /* + * The lsn LSN is the file offset that we're about to write and which + * we will return to the user. + */ DB_LSN lsn; /* LSN at current file offset. */ - DB_LSN c_lsn; /* LSN of the last checkpoint. */ + + /* + * The s_lsn LSN is the last LSN that we know is on disk, not just + * written, by synced. + */ DB_LSN s_lsn; /* LSN of the last sync. */ - DB_LSN uw_lsn; /* LSN of 1st rec not fully on disk. */ u_int32_t len; /* Length of the last record. */ - size_t b_off; /* Current offset in the buffer. */ u_int32_t w_off; /* Current write offset in the file. */ + DB_LSN c_lsn; /* LSN of the last checkpoint. */ time_t chkpt; /* Time of the last checkpoint. */ DB_LOG_STAT stat; /* Log statistics. */ + /* + * The f_lsn LSN is the LSN (returned to the user) that "owns" the + * first byte of the buffer. If the record associated with the LSN + * spans buffers, it may not reflect the physical file location of + * the first byte of the buffer. + */ + DB_LSN f_lsn; /* LSN of first byte in the buffer. */ + size_t b_off; /* Current offset in the buffer. */ u_int8_t buf[4 * 1024]; /* Log buffer. */ }; diff --git a/db2/include/mp.h b/db2/include/mp.h index f68f42b144..f108246f2c 100644 --- a/db2/include/mp.h +++ b/db2/include/mp.h @@ -4,7 +4,7 @@ * Copyright (c) 1996, 1997 * Sleepycat Software. All rights reserved. * - * @(#)mp.h 10.19 (Sleepycat) 10/25/97 + * @(#)mp.h 10.22 (Sleepycat) 11/28/97 */ struct __bh; typedef struct __bh BH; @@ -23,7 +23,6 @@ struct __mpoolfile; typedef struct __mpoolfile MPOOLFILE; #define DB_CACHESIZE_MIN ( 20 * 1024) #define INVALID 0 /* Invalid shared memory offset. */ -#define TEMPORARY "<tmp>" /* Temporary file name. */ /* * There are three ways we do locking in the mpool code: @@ -122,10 +121,10 @@ struct __db_mpool { int fd; /* Underlying mmap'd fd. */ - #define MP_ISPRIVATE 0x01 /* Private, so local memory. */ #define MP_LOCKHANDLE 0x02 /* Threaded, lock handles and region. */ #define MP_LOCKREGION 0x04 /* Concurrent access, lock region. */ +#define MP_MALLOC 0x08 /* If region in allocated memory. */ u_int32_t flags; }; @@ -157,7 +156,6 @@ struct __db_mpoolfile { /* These fields are not protected. */ TAILQ_ENTRY(__db_mpoolfile) q; /* Linked list of DB_MPOOLFILE's. */ - char *path; /* Initial file path. */ DB_MPOOL *dbmp; /* Overlying DB_MPOOL. */ MPOOLFILE *mfp; /* Underlying MPOOLFILE. */ @@ -165,11 +163,9 @@ struct __db_mpoolfile { size_t len; /* Length of mmap'd region. */ /* These fields need to be protected for multi-threaded support. */ -#define MP_PATH_ALLOC 0x001 /* Path is allocated memory. */ -#define MP_PATH_TEMP 0x002 /* Backing file is a temporary. */ -#define MP_READONLY 0x004 /* File is readonly. */ -#define MP_UPGRADE 0x008 /* File descriptor is readwrite. */ -#define MP_UPGRADE_FAIL 0x010 /* Upgrade wasn't possible. */ +#define MP_READONLY 0x01 /* File is readonly. */ +#define MP_UPGRADE 0x02 /* File descriptor is readwrite. */ +#define MP_UPGRADE_FAIL 0x04 /* Upgrade wasn't possible. */ u_int32_t flags; }; @@ -220,12 +216,9 @@ struct __mpoolfile { u_int32_t ref; /* Reference count. */ int ftype; /* File type. */ - int can_mmap; /* If the file can be mmap'd. */ - int lsn_off; /* Page's LSN offset. */ size_t path_off; /* File name location. */ - size_t fileid_off; /* File identification location. */ size_t pgcookie_len; /* Pgin/pgout cookie length. */ @@ -233,6 +226,12 @@ struct __mpoolfile { int lsn_cnt; /* Checkpoint buffers left to write. */ + db_pgno_t last_pgno; /* Last page in the file. */ + +#define MP_CAN_MMAP 0x01 /* If the file can be mmap'd. */ +#define MP_TEMP 0x02 /* Backing file is a temporary. */ + u_int32_t flags; + DB_MPOOL_FSTAT stat; /* Per-file mpool statistics. */ }; diff --git a/db2/include/mp_ext.h b/db2/include/mp_ext.h index 49d86ba2e5..b78b3423cd 100644 --- a/db2/include/mp_ext.h +++ b/db2/include/mp_ext.h @@ -5,8 +5,10 @@ int __memp_pgread __P((DB_MPOOLFILE *, BH *, int)); int __memp_pgwrite __P((DB_MPOOLFILE *, BH *, int *, int *)); int __memp_pg __P((DB_MPOOLFILE *, BH *, int)); void __memp_bhfree __P((DB_MPOOL *, MPOOLFILE *, BH *, int)); -int __memp_fopen __P((DB_MPOOL *, const char *, int, int, - int, size_t, int, DBT *, u_int8_t *, int, DB_MPOOLFILE **)); +int __memp_fopen __P((DB_MPOOL *, MPOOLFILE *, const char *, int, + int, int, size_t, int, DBT *, u_int8_t *, int, DB_MPOOLFILE **)); +char * __memp_fn __P((DB_MPOOLFILE *)); +char * __memp_fns __P((DB_MPOOL *, MPOOLFILE *)); void __memp_debug __P((DB_MPOOL *, FILE *, int)); int __memp_ralloc __P((DB_MPOOL *, size_t, size_t *, void *)); int __memp_ropen diff --git a/db2/include/os_ext.h b/db2/include/os_ext.h index e48a1e9407..2edf2e257d 100644 --- a/db2/include/os_ext.h +++ b/db2/include/os_ext.h @@ -1,5 +1,8 @@ /* DO NOT EDIT: automatically built by dist/distrib. */ int __db_abspath __P((const char *)); +void *__db_calloc __P((size_t, size_t)); +void *__db_malloc __P((size_t)); +void *__db_realloc __P((void *, size_t)); int __os_dirlist __P((const char *, char ***, int *)); void __os_dirfree __P((char **, int)); int __db_fileid __P((DB_ENV *, const char *, int, u_int8_t *)); @@ -14,6 +17,7 @@ int __db_read __P((int, void *, size_t, ssize_t *)); int __db_write __P((int, void *, size_t, ssize_t *)); int __os_seek __P((int, size_t, db_pgno_t, u_long, int)); int __os_sleep __P((u_long, u_long)); +int __os_spin __P((void)); int __os_exists __P((const char *, int *)); int __os_ioinfo __P((const char *, int, off_t *, off_t *)); int __db_unlink __P((const char *)); diff --git a/db2/include/os_func.h b/db2/include/os_func.h index 0a72942903..54b64ffaa2 100644 --- a/db2/include/os_func.h +++ b/db2/include/os_func.h @@ -4,12 +4,11 @@ * Copyright (c) 1997 * Sleepycat Software. All rights reserved. * - * @(#)os_func.h 10.2 (Sleepycat) 10/28/97 + * @(#)os_func.h 10.4 (Sleepycat) 11/28/97 */ /* Calls which can be replaced by the application. */ struct __db_jumptab { - void *(*db_calloc) __P((size_t, size_t)); /* DB_FUNC_CALLOC */ int (*db_close) __P((int)); /* DB_FUNC_CLOSE */ void (*db_dirfree) __P((char **, int)); /* DB_FUNC_DIRFREE */ int (*db_dirlist) /* DB_FUNC_DIRLIST */ @@ -54,7 +53,6 @@ extern struct __db_jumptab __db_jump; * part of DB is the only code that should use the __os_XXX names, all other * parts of DB should be calling __db_XXX functions. */ -#define __db_calloc __db_jump.db_calloc #define __os_close __db_jump.db_close /* __db_close is a wrapper. */ #define __db_dirfree __db_jump.db_dirfree #define __db_dirlist __db_jump.db_dirlist @@ -62,11 +60,9 @@ extern struct __db_jumptab __db_jump; #define __db_free __db_jump.db_free #define __os_fsync __db_jump.db_fsync /* __db_fsync is a wrapper. */ #define __db_ioinfo __db_jump.db_ioinfo -#define __db_malloc __db_jump.db_malloc #define __db_map __db_jump.db_map #define __os_open __db_jump.db_open /* __db_open is a wrapper. */ #define __os_read __db_jump.db_read /* __db_read is a wrapper. */ -#define __db_realloc __db_jump.db_realloc #define __db_seek __db_jump.db_seek #define __db_sleep __db_jump.db_sleep #define __db_strdup __db_jump.db_strdup |