cp_hashlist_callback(3) - Linux man page

Name

cp_hashlist_callback - invoke a callback on hashlist mappings

Synopsis

#include <cprops/hashlist.h>

int cp_hashlist_callback(cp_hashlist *list,

int (*cb)(void *key, void *value, void *id), void *id);

Description

cp_hashlist_callback iterates over all entries in a hashlist, invoking the callback function cb on each key / value pair in the list. In addition the id parameter is passed to the callback function with no change.

Iteration stops if the callback returns non-zero or after the callback has been invoked on all mappings.

Return Value

cp_hashlist_callback returns 0 on success or -1 on locking failure.