aboutsummaryrefslogtreecommitdiff
path: root/src/core/idhash.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-13 18:31:40 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-13 18:31:40 -0700
commit841048a806f7836bd1196f48c5ee3db5ca844b88 (patch)
tree1582ba9008299801f130796df397c4d18b6a9673 /src/core/idhash.h
parent14caa074a83fa2e659b3e490bf9bd31ff0b6b4b1 (diff)
downloadnng-841048a806f7836bd1196f48c5ee3db5ca844b88.tar.gz
nng-841048a806f7836bd1196f48c5ee3db5ca844b88.tar.bz2
nng-841048a806f7836bd1196f48c5ee3db5ca844b88.zip
idhash has it's own lock now.
Diffstat (limited to 'src/core/idhash.h')
-rw-r--r--src/core/idhash.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/core/idhash.h b/src/core/idhash.h
index 018420bc..70740b39 100644
--- a/src/core/idhash.h
+++ b/src/core/idhash.h
@@ -21,19 +21,11 @@
// we use a better probe (taken from Python) to avoid hitting the same
// positions. Our hash algorithm is just the low order bits, and we
// use table sizes that are powers of two. Note that hash items
-// must be non-NULL. The table is locked.
+// must be non-NULL. The table is protected by an internal lock.
typedef struct nni_idhash nni_idhash;
typedef struct nni_idhash_entry nni_idhash_entry;
-// nni_idhash_walkfn is called when walking a hash table. If the
-// return value is non-zero, then nni_idhash_walk will terminate further
-// process and return that return value. The function takes the generic
-// opaque value for the walk as its first argument, and the next two
-// arguments are the hash key and the opaque value stored with it.
-// Note that the walkfn must not attempt to change the hash table.
-// The user must provide any locking needed.
-typedef int (*nni_idhash_walkfn)(void *, uint32_t, void *);
extern int nni_idhash_init(nni_idhash **);
extern void nni_idhash_fini(nni_idhash *);
extern void nni_idhash_reclaim(nni_idhash *);
@@ -45,6 +37,5 @@ extern int nni_idhash_remove(nni_idhash *, uint32_t);
extern int nni_idhash_insert(nni_idhash *, uint32_t, void *);
extern int nni_idhash_alloc(nni_idhash *, uint32_t *, void *);
extern size_t nni_idhash_count(nni_idhash *);
-extern int nni_idhash_walk(nni_idhash *, nni_idhash_walkfn, void *);
#endif // CORE_IDHASH_H