/* The opaque type representing a hash table. */ struct dshash_table; typedefstruct dshash_table dshash_table;
/* A handle for a dshash_table which can be shared with other processes. */ typedef dsa_pointer dshash_table_handle;
/* Sentinel value to use for invalid dshash_table handles. */ #define DSHASH_HANDLE_INVALID ((dshash_table_handle) InvalidDsaPointer)
/* The type for hash values. */ typedef uint32 dshash_hash;
/* A function type for comparing keys. */ typedefint (*dshash_compare_function) (constvoid *a, constvoid *b,
size_t size, void *arg);
/* A function type for computing hash values for keys. */ typedef dshash_hash (*dshash_hash_function) (constvoid *v, size_t size, void *arg);
/* A function type for copying keys. */ typedefvoid (*dshash_copy_function) (void *dest, constvoid *src, size_t size, void *arg);
/* *Thesetofparametersneededtocreateorattachtoahashtable.The *tranche_idmemberdoesnotneedtobeinitializedwhenattachingtoan *existinghashtable. * *Compare,hash,andcopyfunctionsmustbesuppliedevenwhenattaching, *becausewecan'tsafelysharefunctionpointersbetweenbackendsingeneral. *Theuserdatapointersuppliedtothecreateandattachfunctionswillbe *passedtothesefunctions.
*/ typedefstruct dshash_parameters
{
size_t key_size; /* Size of the key (initial bytes of entry) */
size_t entry_size; /* Total size of entry */
dshash_compare_function compare_function; /* Compare function */
dshash_hash_function hash_function; /* Hash function */
dshash_copy_function copy_function; /* Copy function */ int tranche_id; /* The tranche ID to use for locks */
} dshash_parameters;
/* Forward declaration of private types for use only by dshash.c. */ struct dshash_table_item; typedefstruct dshash_table_item dshash_table_item;
/* *Sequentialscanstate.Thedetailisexposedtoletusersknowthestorage *sizebutitshouldbeconsideredasanopaquetypebycallers.
*/ typedefstruct dshash_seq_status
{
dshash_table *hash_table; /* dshash table working on */ int curbucket; /* bucket number we are at */ int nbuckets; /* total number of buckets in the dshash */
dshash_table_item *curitem; /* item we are currently at */
dsa_pointer pnextitem; /* dsa-pointer to the next item */ int curpartition; /* partition number we are at */ bool exclusive; /* locking mode */
} dshash_seq_status;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.