|
-
NAMEdbh_sweep, dbh_fanout, dbh_foreach_sweep, dbh_foreach_fanout, dbh_exit_sweep, dbh_exit_fanout - apply a function to all or part of the DBHashtableSYNOPSIS#include <dbh.h>int dbh_foreach_sweep (DBHashTable *dbh,
DBHashFunc operate);
DESCRIPTIONdbh_foreach_sweep applies function operate to each member of the hash, following a sweep trajectory. Sweep is done by traversing the DBHashTable in a vertical direction through all branches.dbh_foreach_fanout applies a function operate to each member of the hash, following a fanout trajectory. Fanout is done by traversing the DBHashTable in a horizontal direction through all records. dbh_sweep and dbh_fanout apply a function to subtree members of the hash, where dbh_sweep follows a sweep trajectory (vertically through branches) and dbh_fanout follows a fanout trajectory (horizontally through branches). key1 is the key from which to start the sweep or NULL if
you don't care and want to start at the top. If you decide to define
key1 make sure it is a top level node of a subtree. This is done with
dbh_find
In these functions, operate ( void (*operate) (DBHashTable *dbh) ) is the function to apply to each selected member of the DBHashTable dbh_exit_sweep and dbh_exit_fanout within the operate function will cause the exit of a currently running sweep or fanout. RETURN VALUE0 on error, 1 otherwise.NOTESIn order for sweep/fanout functions to be extremely fast, you should prepare the DBHashTable for the trajectory you intend to use with dbh_regen_sweep or dbh_regen_fanout first. This allows for extremely efficient use of hardware and operating system caches.SEE ALSOdbh (0), dbh_regen_sweep (3), dbh_regen_fanout (3), dbh_find (3), dbh_settempdir (3)AuthorEdscott Wilson Garcia <edscott@xfce.org>
Visit the GSP FreeBSD Man Page Interface. |