mpool_filter()

filter memory pool data 

Function


SYNOPSIS

#include <db.h>

#include <mpool.h>

void mpool_filter(MPOOL *mp, void (*pgin)(void *, pgno_t, void *), void (*pgout)(void *, pgno_t, void *), void *pgcookie);


DESCRIPTION

The mpool_filter() function is intended to make transparent input and output processing of pages transparent. If a page-in function is specified, it is called each time a buffer is read into the memory pool from the backing file. If the page-out function is specified, it is called each time a buffer is written into the backing file. Both functions are called with the pgcookie parameter, the page number, and a pointer to the back being read or written.


PARAMETERS

mp 

Points to the memory pool whose data is to be filtered. This must be a pointer returned by a prior call to mpool_open().

pgin 

Is an optional function to be called whenever a page is read from the backing file.

pgout 

Is an optional function to be called whenever a page is written to the backing file.

pgcookie 

Is an arbitrary value passed to the page-in and page-out functions.


RETURN VALUES

Nothing


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
mpool_close(), mpool_get(), mpool_new(), mpool_open(), mpool_put(), mpool_sync()


PTC MKS Toolkit 10.5 Documentation Build 40.