Import BSDDB 4.7.25 (as of svn r89086)

This commit is contained in:
Zachary Ware
2017-09-04 13:40:25 -05:00
parent 4b29e0458f
commit 8f590873d0
4781 changed files with 2241032 additions and 6 deletions

21
docs_src/rtc/Makefile Normal file
View File

@@ -0,0 +1,21 @@
C= set_func_close.html \
set_func_dirfree.html \
set_func_dirlist.html \
set_func_exists.html \
set_func_file_map.html \
set_func_free.html \
set_func_fsync.html \
set_func_ftruncate.html \
set_func_ioinfo.html \
set_func_malloc.html \
set_func_open.html \
set_func_pread.html \
set_func_pwrite.html \
set_func_read.html \
set_func_realloc.html \
set_func_region_map.html \
set_func_rename.html \
set_func_seek.html \
set_func_unlink.html \
set_func_write.html \
set_func_yield.html

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_close.so,v 10.14 2003/09/25 15:28:06 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_close)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_close),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_close(int (*func_close)(int fd));
]))
m4_posix_func(close)
m4_scope_process(dbenv_set_func_close)
m4_when_init(dbenv_set_func_close)
m4_return(dbenv_set_func_close, std)
m4_param_replace(func_close)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,34 @@
m4_comment([$Id: set_func_dirfree.so,v 10.19 2004/08/13 03:39:02 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_dirfree)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_dirfree),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_dirfree(void (*func_dirfree)(char **namesp, int cnt));
]))
m4_p([dnl
The m4_db library requires the ability to return any memory allocated as part
of the routine which reads through a directory and creates a list of files
that the directory contains (see m4_ref(dbenv_set_func_dirlist)).])
m4_scope_process(dbenv_set_func_dirfree)
m4_when_init(dbenv_set_func_dirfree)
m4_return(dbenv_set_func_dirfree, std)
m4_parambegin
m4_param(func_dirfree, [dnl
The m4_arg(func_dirfree) parameter is a function which frees the memory
returned from the m4_ref(dbenv_set_func_dirlist) function.
m4_p([dnl
The m4_arg(namesp) and m4_arg(cnt) parameters to this function are the
same values as were returned by the m4_ref(dbenv_set_func_dirlist)
function.])])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,39 @@
m4_comment([$Id: set_func_dirlist.so,v 10.19 2004/08/13 03:39:02 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_dirlist)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_dirlist),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_dirlist(
int (*func_dirlist)(const char *dir, char ***namesp, int *cntp));
]))
m4_p([dnl
The m4_db library requires the ability to read through a directory and
create a list of files that the directory contains.])
m4_scope_process(dbenv_set_func_dirlist)
m4_when_init(dbenv_set_func_dirlist)
m4_return(dbenv_set_func_dirlist, std)
m4_parambegin
m4_param(func_dirlist, [dnl
The m4_arg(func_dirlist) parameter is the function which reads through
a directory and returns a list of the files it contains.
m4_p([dnl
The m4_arg(dir) parameter to this function is the name of the directory
to be searched.])
m4_p([dnl
The function must return a pointer to an array of nul-terminated file
names into the memory location to which the m4_arg(namesp) parameter
refers, and a count of the number of elements in the array into the
memory location to which m4_arg(cntp) refers.])])
m4_ret_internal(func_dirlist)
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,36 @@
m4_comment([$Id: set_func_exists.so,v 10.18 2004/08/13 03:39:02 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_exists)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_exists),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_exists(int (*func_exists)(const char *path, int *isdirp));
]))
m4_p([dnl
The m4_db library requires the ability to determine whether a file
exists and whether it is a file of type directory.])
m4_scope_process(dbenv_set_func_exists)
m4_when_init(dbenv_set_func_exists)
m4_return(dbenv_set_func_exists, std)
m4_parambegin
m4_param(func_exists, [dnl
The m4_arg(func_exists) parameter is the function which returns if a
file exists and if it is a file of type directory.
m4_p([dnl
The m4_arg(path) parameter to this function is the pathname of the file
to be checked.])
m4_p([dnl
If the m4_arg(isdirp) parameter is non-NULL, it must be set to non-0 if
m4_arg(path) is a directory, and 0 if m4_arg(path) is not a directory.])
m4_ret_internal(func_exists)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,61 @@
m4_comment([$Id: set_func_file_map.so,v 10.22 2008/01/17 03:26:52 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_file_map)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_file_map),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_file_map(
int (*func_file_map)(DB_ENV *dbenv, char *path, size_t len, int is_rdonly, void **addr),
int (*func_file_unmap)(DB_ENV *dbenv, void *addr));
]))
m4_p([dnl
The m4_db library optionally uses the ability to map a file into memory.])
m4_scope_process(dbenv_set_func_file_map)
m4_when_init(dbenv_set_func_file_map)
m4_return(dbenv_set_func_file_map, std)
m4_parambegin
m4_param(func_file_map, [dnl
The m4_arg(func_file_map) parameter is the function which maps a file
into memory. The function takes 5 parameters:
m4_tagbegin
m4_tag(m4_arg(dbenv), [dnl
The m4_arg(dbenv) parameter is the enclosing database environment handle.])
m4_tag(m4_arg(path), [dnl
The m4_arg(path) parameter is the name of file. Repeated requests for
the mapping of the same name should return a reference to the same
memory.])
m4_tag(m4_arg(len), [dnl
The m4_arg(len) parameter is the length, in bytes, of the file.])
m4_tag(m4_arg(is_rdonly), [dnl
The m4_arg(is_rdonly) parameter will be non-zero if the mapped file is
read-only.])
m4_tag(m4_arg(addr), [dnl
The m4_arg(addr) parameter is the memory location into which a pointer
to the mapped file is returned.])
m4_tagend
m4_ret_internal(func_file_map)])
m4_param(func_file_unmap, [dnl
The m4_arg(func_file_unmap) parameter is the function which unmaps a
file from memory. The function takes 2 parameters:
m4_tagbegin
m4_tag(m4_arg(dbenv), [dnl
The m4_arg(dbenv) parameter is the enclosing database environment handle.])
m4_tag(m4_arg(addr), [dnl
The m4_arg(addr) parameter is the value returned by the
m4_arg(func_file_map) function when the file or region was mapped into
memory.])
m4_tagend
m4_ret_internal(func_file_unmap)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_free.so,v 10.14 2003/09/25 15:28:07 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_free)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_free),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_free(void (*func_free)(void *ptr));
]))
m4_ansi_func(free)
m4_scope_process(dbenv_set_func_free)
m4_when_init(dbenv_set_func_free)
m4_return(dbenv_set_func_free, std)
m4_param_replace(func_free)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_fsync.so,v 10.14 2003/09/25 15:28:07 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_fsync)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_fsync),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_fsync(int (*func_fsync)(int fd));
]))
m4_posix_func(fsync)
m4_scope_process(dbenv_set_func_fsync)
m4_when_init(dbenv_set_func_fsync)
m4_return(dbenv_set_func_fsync, std)
m4_param_replace(func_fsync)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,34 @@
m4_comment([$Id: set_func_ftruncate.so,v 1.3 2004/09/20 14:29:50 mjc Exp $])
define(M4PAGELOCAL, dbenv_set_func_ftruncate)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_ftruncate),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_ftruncate(int (*func_ftruncate)(int fd, off_t offset));
]))
m4_p([dnl
The m4_db library requires the ability to truncate a file.])
m4_scope_process(dbenv_set_func_ftruncate)
m4_when_init(dbenv_set_func_ftruncate)
m4_return(dbenv_set_func_ftruncate, std)
m4_parambegin
m4_param(func_ftruncate, [dnl
The m4_arg(func_ftruncate) parameter is the function which truncates a file.
m4_p([dnl
The m4_arg(fd) parameter is an open file descriptor on the file.])
m4_p([dnl
The m4_arg(ftruncate) function must truncate the file to the byte
length specified by the m4_arg(offset) parameter.])
m4_ret_internal(func_ftruncate)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,45 @@
m4_comment([$Id: set_func_ioinfo.so,v 10.17 2004/08/13 03:39:02 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_ioinfo)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_ioinfo),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_ioinfo(int (*func_ioinfo)(const char *path,
int fd, u_int32_t *mbytesp, u_int32_t *bytesp, u_int32_t *iosizep));
]))
m4_p([dnl
The m4_db library requires the ability to determine the size and I/O
characteristics of a file.])
m4_scope_process(dbenv_set_func_ioinfo)
m4_when_init(dbenv_set_func_ioinfo)
m4_return(dbenv_set_func_ioinfo, std)
m4_parambegin
m4_param(func_ioinfo, [dnl
The m4_arg(func_ioinfo) parameter is the function which returns the size
and I/O characteristics of a file.
m4_p([dnl
The m4_arg(path) parameter is the pathname of the file to be checked, and the
m4_arg(fd) parameter is an open file descriptor on the file.])
m4_p([dnl
If the m4_arg(mbytesp) and m4_arg(bytesp) parameters are non-NULL, the
m4_arg(ioinfo) function must return in them the size of the file: the
number of megabytes in the file into the memory location to which the
m4_arg(mbytesp) parameter refers, and the number of bytes over and above
that number of megabytes into the memory location to which the
m4_arg(bytesp) parameter refers.])
m4_p([dnl
In addition, if the m4_arg(iosizep) parameter is non-NULL, the m4_arg(ioinfo)
function must return the optimum granularity for I/O operations to the file
into the memory location to which it refers.])
m4_ret_internal(func_ioinfo)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_malloc.so,v 10.14 2003/09/25 15:28:07 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_malloc)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_malloc),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_malloc(void *(*func_malloc)(size_t size));
]))
m4_ansi_func(malloc)
m4_scope_process(dbenv_set_func_malloc)
m4_when_init(dbenv_set_func_malloc)
m4_return(dbenv_set_func_malloc, std)
m4_param_replace(func_malloc)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_open.so,v 10.14 2003/09/25 15:28:07 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_open)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_open),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_open(int (*func_open)(const char *path, int flags, int mode));
]))
m4_posix_func(open)
m4_scope_process(dbenv_set_func_open)
m4_when_init(dbenv_set_func_open)
m4_return(dbenv_set_func_open, std)
m4_param_replace(func_open)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_pread.so,v 1.1 2003/12/11 21:32:46 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_pread)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_pread),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_pread(ssize_t (*func_pread)(int fd, void *buf, size_t nbytes, off_t offset));
]))
m4_posix_func(pread)
m4_scope_process(dbenv_set_func_pread)
m4_when_init(dbenv_set_func_pread)
m4_return(dbenv_set_func_pread, std)
m4_param_replace(func_pread)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_pwrite.so,v 1.1 2003/12/11 21:32:47 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_pwrite)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_pwrite),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_pwrite(ssize_t (*func_pwrite)(int fd, const void *buf, size_t nbytes, off_t offset));
]))
m4_posix_func(pwrite)
m4_scope_process(dbenv_set_func_pwrite)
m4_when_init(dbenv_set_func_pwrite)
m4_return(dbenv_set_func_pwrite, std)
m4_param_replace(func_pwrite)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_read.so,v 10.14 2003/09/25 15:28:08 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_read)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_read),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_read(ssize_t (*func_read)(int fd, void *buf, size_t nbytes));
]))
m4_posix_func(read)
m4_scope_process(dbenv_set_func_read)
m4_when_init(dbenv_set_func_read)
m4_return(dbenv_set_func_read, std)
m4_param_replace(func_read)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_realloc.so,v 10.14 2003/09/25 15:28:08 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_realloc)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_realloc),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_realloc(void *(*func_realloc)(void *ptr, size_t size));
]))
m4_ansi_func(realloc)
m4_scope_process(dbenv_set_func_realloc)
m4_when_init(dbenv_set_func_realloc)
m4_return(dbenv_set_func_realloc, std)
m4_param_replace(func_realloc)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,76 @@
m4_comment([$Id: set_func_region_map.so,v 10.22 2008/01/17 03:26:52 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_region_map)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_region_map),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_region_map(
int (*func_region_map)(DB_ENV *dbenv, char *path, size_t len, int *is_create, void **addr),
int (*func_region_unmap)(DB_ENV *dbenv, void *addr));
]))
m4_p([dnl
The m4_db library optionally uses the ability to create shared memory
regions (which may or may not be backed by physical files). The memory
will be used as a shared memory region for synchronization between m4_db
threads/processes; while the returned memory may be of any kind (for
example, anonymous memory), it must be able to support semaphores.])
m4_scope_process(dbenv_set_func_region_map)
m4_when_init(dbenv_set_func_region_map)
m4_return(dbenv_set_func_region_map, std)
m4_parambegin
m4_param(func_region_map, [dnl
The m4_arg(func_region_map) parameter is the function which creates
shared memory regions. The function takes 5 parameters:
m4_tagbegin
m4_tag(m4_arg(dbenv), [dnl
The m4_arg(dbenv) parameter is the enclosing database environment
handle. This handle is provided to uniquely identify a shared memory
region: the m4_arg(dbenv) parameter and the path are a unique identifier
pair for mapping any new region, and the m4_arg(dbenv) parameter and the
address are a unique identifier pair for unmapping any region.])
m4_tag(m4_arg(path), [dnl
The m4_arg(path) parameter is the name of the region. Repeated requests
for the shared regions of the same name, in the same database
environment, should return a reference to the same memory.])
m4_tag(m4_arg(len), [dnl
The m4_arg(len) parameter is the length, in bytes, needed for the
region.])
m4_tag(m4_arg(is_create), [dnl
The memory referenced by the m4_arg(is_create) parameter will be
non-zero if flags to m4_db allowed creation of the mapped region; the
memory referenced by the m4_arg(is_create) parameter must be set to
non-zero if the region is created by the m4_arg(func_region_map) function, and
set to zero if the region is not created by the function. This returned
information will determine if the region is subsequently initialized by
m4_db.])
m4_tag(m4_arg(addr), [dnl
The m4_arg(addr) parameter is the memory location into which a pointer
to the region or mapped file is returned.])
m4_tagend
m4_ret_internal(func_region_map)])
m4_param(func_region_unmap, [dnl
The m4_arg(func_region_unmap) parameter is the function which unmaps a
shared memory region. The function takes 2 parameters:
m4_tagbegin
m4_tag(m4_arg(dbenv), [dnl
The m4_arg(dbenv) parameter is the enclosing database environment handle.])
m4_tag(m4_arg(addr), [dnl
The m4_arg(addr) parameter is the value returned by the
m4_arg(func_region_map) function when the region was mapped into
memory.])
m4_tagend
m4_ret_internal(func_region_unmap)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_rename.so,v 10.16 2003/09/25 15:28:08 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_rename)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_rename),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_rename(int (*func_rename)(const char *from, const char *to));
]))
m4_posix_func(rename)
m4_scope_process(dbenv_set_func_rename)
m4_when_init(dbenv_set_func_rename)
m4_return(dbenv_set_func_rename, std)
m4_param_replace(func_rename)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,40 @@
m4_comment([$Id: set_func_seek.so,v 10.19 2004/09/20 14:29:50 mjc Exp $])
define(M4PAGELOCAL, dbenv_set_func_seek)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_seek),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_seek(int (*func_seek)(int fd, off_t offset, int whence));
]))
m4_p([dnl
The m4_db library requires the ability to specify that a subsequent read
from or write to a file will occur at a specific location in that file.])
m4_scope_process(dbenv_set_func_seek)
m4_when_init(dbenv_set_func_seek)
m4_return(dbenv_set_func_seek, std)
m4_parambegin
m4_param(func_seek, [dnl
The m4_arg(func_seek) parameter is the function which seeks to a specific
location in a file.
m4_p([dnl
The m4_arg(fd) parameter is an open file descriptor on the file.])
m4_p([dnl
The m4_arg(seek) function must cause a subsequent read from or write to
the file to occur at the byte offset specified by the m4_arg(offset)
parameter.])
m4_p([dnl
The m4_arg(whence) parameter specifies where in the file the byte offset
is relative to, as described by the m4_posix1_name m4_arg(lseek) system
call.])
m4_ret_internal(func_seek)])
m4_paramend
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,23 @@
m4_comment([$Id: set_func_unlink.so,v 10.14 2003/09/25 15:28:09 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_unlink)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_unlink),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_unlink(int (*func_unlink)(const char *path));
]))
m4_posix_func(unlink)
m4_scope_process(dbenv_set_func_unlink)
m4_when_init(dbenv_set_func_unlink)
m4_return(dbenv_set_func_unlink, std)
m4_param_replace(func_unlink)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,24 @@
m4_comment([$Id: set_func_write.so,v 10.14 2003/09/25 15:28:09 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_write)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_write),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_write(
ssize_t (*func_write)(int fd, const void *buffer, size_t nbytes));
]))
m4_posix_func(write)
m4_scope_process(dbenv_set_func_write)
m4_when_init(dbenv_set_func_write)
m4_return(dbenv_set_func_write, std)
m4_param_replace(func_write)
m4_rtc_seealso
m4_page_footer

View File

@@ -0,0 +1,44 @@
m4_comment([$Id: set_func_yield.so,v 10.21 2007/10/24 20:06:08 bostic Exp $])
define(M4PAGELOCAL, dbenv_set_func_yield)
include(m4/m4.seealso)
m4_pf_header(m4_ref(dbenv_set_func_yield),
ifelse(M4API, C_API, [dnl
int
db_env_set_func_yield(int (*func_yield)(u_long secs, u_long usecs));
]))
m4_p([dnl
The m4_db library requires the ability to yield the processor from the
current thread of control to any other waiting threads of control.])
m4_p([dnl
The m4_arg(func_yield) function must be able to cause the rescheduling
of all participants in the current m4_db environment, whether threaded
or not. It may be incorrect to supply a thread m4_arg(yield) function
if more than a single process is operating in the m4_db environment.
This is because many thread-yield functions will not allow other
processes to run, and the contested lock may be held by another process,
not by another thread.])
m4_scope_process(dbenv_set_func_yield)
m4_when_init(dbenv_set_func_yield)
m4_return(dbenv_set_func_yield, std)
m4_parambegin
m4_param(func_yield, [dnl
The m4_arg(func_yield) parameter is the function which yields the processor.
m4_p([dnl
The m4_arg(secs) parameter is the number of seconds to pause before the
thread of control should run again, or 0.])
m4_p([dnl
The m4_arg(usecs) parameter is the number of microseconds to pause
before the thread of control should run again, or 0.])
m4_ret_internal(func_yield)])
m4_paramend
m4_rtc_seealso
m4_page_footer