macro LFDS710_HASH_A_SET_VALUE_IN_ELEMENT

From liblfds.org
Revision as of 21:04, 7 May 2016 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source File

└───liblfds710
    └───inc
        └───liblfds710
                lfds710_hash_addonly.h

Macro

#define LFDS710_HASH_A_SET_VALUE_IN_ELEMENT( hash_a_element, new_value )

Parameters

hash_a_element

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

new_value

A void pointer, which the value in hash_a_element is set to.

Return Value

No return value.

Example

char
  random_data[10];

struct lfds710_hash_a_element
  haw;

LFDS710_HASH_A_SET_VALUE_IN_ELEMENT( haw, (void *) random_data );

Notes

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

The value is set atomically, and so can be used at any time, on an element in the hash or before it enters the hash, unlike setting a key, which can only be done before an element enters the hash.

See Also

Hash (add-only)