ck_hs_put(3) store unique key into a hash set

LIBRARY

Concurrency Kit (libck, -lck)

SYNOPSIS

In ck_hs.h Ft bool Fn ck_hs_put ck_hs_t *hs unsigned long hash const void *key

DESCRIPTION

The Fn ck_hs_put 3 function will store the key specified by the Fa key argument in the hash set pointed to by the Fa hs argument. The key specified by Fa key is expected to have the hash value specified by the Fa hash argument (which was previously generated using the CK_HS_HASH3 macro).

If the call to Fn ck_hs_put 3 was successful then the key specified by Fa key was successfully stored in the hash set pointed to by Fa hs . The function will fail if a key with an equivalent value to Fa key is already present in the hash set. For replacement semantics, please see the ck_hs_set3 function.

RETURN VALUES

Upon successful completion, Fn ck_hs_put 3 returns true and otherwise returns false on failure.

ERRORS

Behavior is undefined if Fa key or Fa hs are uninitialized. The function will also return false if the hash set could not be enlarged to accomodate key insertion.