function lfds710_hash_a_get_by_key

From liblfds.org
Revision as of 18:10, 30 May 2016 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_hash_addonly.h
    └───src
        └───llfds710_freelist
                lfds710_hash_addonly_get.c

Opaque Structures

struct lfds710_hash_a_element;
struct lfds710_hash_a_state;

Prototype

int lfds710_hash_a_get_by_key( struct lfds710_hash_a_state *has,
                               int (*key_compare_function)(void const *new_key, void const *existing_key),
                               void (*key_hash_function)(void const *key, lfds710_pal_uint_t *hash),
                               void *key,
                               struct lfds710_hash_a_element **hae );

Parameters

struct lfds710_hash_a_state *has

A pointer to an initialized struct lfds710_hash_a_state.

int (*key_compare_function)(void const *new_key, void const *existing_key)

A callback used by the hash to compare elements. This callback, if provided, over-rides the matching callback provided to lfds710_hash_a_init_valid_on_current_logical_core. This argument can be NULL.

void (*key_hash_function)(void const *key, lfds710_uint_t *hash)

A callback used by the hash to hash elements. This callback, if provided, over-rides the matching callback provided to lfds710_hash_a_init_valid_on_current_logical_core. This argument can be NULL.

void *key

Points to (or is itself) a key.

struct lfds710_hash_a_element **hae

*hae is set to point the element with the key key. This argument is NOT set to NULL if the key is not found.

Return Value

Returns 1 if the element was found, 0 if not.

Notes

No notes.

See Also