diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-04-18 02:31:37 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-04-18 02:31:37 +0000 |
commit | b6a043747e2041e97decf4b4c5a3b51c3b40b722 (patch) | |
tree | c6c14265f086944a40c745c9b3abc688654ad4a4 /lib/libc/db/man/mpool.3 | |
parent | c54562ea65bf14ce1a19255902b9ff66e13c853a (diff) |
Repairs.
Diffstat (limited to 'lib/libc/db/man/mpool.3')
-rw-r--r-- | lib/libc/db/man/mpool.3 | 49 |
1 files changed, 33 insertions, 16 deletions
diff --git a/lib/libc/db/man/mpool.3 b/lib/libc/db/man/mpool.3 index e7f767e89a0..c35a6a61588 100644 --- a/lib/libc/db/man/mpool.3 +++ b/lib/libc/db/man/mpool.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mpool.3,v 1.11 2000/01/22 12:00:42 aaron Exp $ +.\" $OpenBSD: mpool.3,v 1.12 2000/04/18 02:31:36 aaron Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,14 @@ .Dt MPOOL 3 .Os .Sh NAME -.Nm mpool +.Nm mpool_open , +.Nm mpool_filter , +.Nm mpool_new , +.Nm mpool_delete , +.Nm mpool_get , +.Nm mpool_put , +.Nm mpool_sync , +.Nm mpool_close .Nd shared memory buffer pool .Sh SYNOPSIS .Fd #include <db.h> @@ -59,7 +66,7 @@ .Ft int .Fn mpool_close "MPOOL *mp" .Sh DESCRIPTION -.Nm +.Nm mpool is the library interface intended to provide page oriented buffer management of files. The buffers may be shared between processes. @@ -116,7 +123,9 @@ pointer, the page number and a pointer to the page to being read or written. .Pp The function .Fn mpool_new -takes an MPOOL pointer, an address, and a set of flags as arguments. +takes an +.Dv MPOOL +pointer, an address, and a set of flags as arguments. If a new page can be allocated, a pointer to the page is returned and the page number is stored into the .Fa pgnoaddr @@ -125,31 +134,38 @@ Otherwise, .Dv NULL is returned and .Va errno -is set. The flags value is formed by +is set. +The flags value is formed by .Tn OR Ns 'ing the following values: .Bl -tag -width Ds -.It MPOOL_PAGE_REQUEST +.It Dv MPOOL_PAGE_REQUEST Allocate a new page with a specific page number. -.It MPOOL_PAGE_NEXT +.It Dv MPOOL_PAGE_NEXT Allocate a new page with the next page number. .El .Pp The function .Fn mpool_delete -deletes the specified page from a pool and frees the page. It takes -an MPOOL pointer and a page as arguments. The page must have been -generated by +deletes the specified page from a pool and frees the page. +It takes an +.Dv MPOOL +pointer and a page as arguments. +The page must have been generated by .Fn mpool_new . .Pp The function .Fn mpool_get -takes an MPOOL pointer and a page number as arguments. If the page -exists, a pointer to the page is returned. Otherwise, +takes an +.Dv MPOOL +pointer and a page number as arguments. +If the page exists, a pointer to the page is returned. +Otherwise, .Dv NULL is returned and .Va errno -is set. The flags parameter is not currently used. +is set. +The flags parameter is not currently used. .Pp The function .Fn mpool_put @@ -164,7 +180,7 @@ The flags value is formed by .Tn OR Ns 'ing the following values: .Bl -tag -width Ds -.It MPOOL_DIRTY +.It Dv MPOOL_DIRTY The page has been modified and needs to be written to the backing file. .El .Pp @@ -173,8 +189,9 @@ returns 0 on success and \-1 if an error occurs. .Pp The function .Fn mpool_sync -writes all modified pages associated with the MPOOL pointer to the -backing file. +writes all modified pages associated with the +.Dv MPOOL +pointer to the backing file. .Fn mpool_sync returns 0 on success and \-1 if an error occurs. .Pp |