cp_hashtable_unset_mode(3) - Linux man page
Name
cp_hashtable_set_mode, cp_hashtable_unset_mode - set/unset hashtable mode bitsSynopsis
#include <cprops/hashtable.h>int cp_hashtable_set_mode(cp_hashtable *table, int mode);
int cp_hashtable_get_mode(cp_hashtable *table);
int cp_hashtable_unset_mode(cp_hashtable *table, int mode);
Description
- COLLECTION_MODE_DEEP - when removing or replacing a mapping, the
- destructor functions are called on the key and value constituting the mapping.
- COLLECTION_MODE_MULTIPLE_VALUES - allows multiple mappings for a given
- key on insertion. When retrieving values the results are given in a newly allocated cp_list, even if it contains only one entry.
- COLLECTION_MODE_COPY - on insertion, the applicable copy functions
- specified are used to store copies of the key and value.
- COLLECTION_MODE_NOSYNC - operations are performed with no locking.
- Synchronization features should not be used on tables created in this mode.
- COLLECTION_MODE_NORESIZE - the table is not extended on insertion nor
- compacted on removal regardless of maximal and minimal fill factor settings.
Return Value
cp_hashtable_get_mode returns the table mode on success or -1 if a locking error occurs.cp_hashtable_set_mode returns 0 on success, -1 if a locking error occurs or EINVAL if attempting to set COLLECTION_MODE_NOSYNC while the current thread owns the table lock. cp_hashtable_unset_mode returns 0 on success or -1 if a locking error occurs.