macro LFDS700_HASH_A_GET_KEY_FROM_ELEMENT

From liblfds.org
Revision as of 13:11, 16 December 2015 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source File

└───liblfds700
    └───inc
        └───liblfds700
                lfds700_hash_addonly.h

Opaque Structures

struct lfds700_hash_a_element;

Macro

#define LFDS700_HASH_A_GET_KEY_FROM_ELEMENT( hash_a_element )

Parameters

hash_a_element

A struct lfds700_hash_a_element. Not a pointer to it - the struct itself.

Return Value

Returns a void pointer, the key from the element.

Example

struct lfds700_hash_a_element
  hae;

void
  *key;

key = LFDS700_HASH_A_GET_KEY_FROM_ELEMENT( hae );

Notes

The key once set in an element is only guaranteed to be read correctly by other logical cores once the element has been insert into the hash.

As with all liblfds macros, the macro operates on the structure itself, not a pointer to it.

See Also

Hash (add-only)