diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-05 17:59:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-05 17:59:23 -0700 |
| commit | eef8f5f4a4d8d05470503e7f6dc7270c7e488cb5 (patch) | |
| tree | 0a4a8c3ee44e643ce47ae55cf8fb81e06d59d5d6 /src/core/idhash.h | |
| parent | f1cb2402734567b84e2b55129f98f9764167e13e (diff) | |
| download | nng-eef8f5f4a4d8d05470503e7f6dc7270c7e488cb5.tar.gz nng-eef8f5f4a4d8d05470503e7f6dc7270c7e488cb5.tar.bz2 nng-eef8f5f4a4d8d05470503e7f6dc7270c7e488cb5.zip | |
idhash: introduce nni_idhash_count.
This will be used for some follow up work (UDP).
Diffstat (limited to 'src/core/idhash.h')
| -rw-r--r-- | src/core/idhash.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/idhash.h b/src/core/idhash.h index 11cc7a08..b07404aa 100644 --- a/src/core/idhash.h +++ b/src/core/idhash.h @@ -46,15 +46,16 @@ struct nni_id_map { #define NNI_ID_FLAG_RANDOM 2 // start at a random value #define NNI_ID_FLAG_REGISTER 4 // map is registered for finalization -extern void nni_id_map_init(nni_id_map *, uint64_t, uint64_t, bool); -extern void nni_id_map_fini(nni_id_map *); -extern void *nni_id_get(nni_id_map *, uint64_t); -extern int nni_id_set(nni_id_map *, uint64_t, void *); -extern int nni_id_alloc(nni_id_map *, uint64_t *, void *); -extern int nni_id_alloc32(nni_id_map *, uint32_t *, void *); -extern int nni_id_remove(nni_id_map *, uint64_t); -extern void nni_id_map_sys_fini(void); -extern bool nni_id_visit(nni_id_map *, uint64_t *, void **, uint32_t *); +extern void nni_id_map_init(nni_id_map *, uint64_t, uint64_t, bool); +extern void nni_id_map_fini(nni_id_map *); +extern void *nni_id_get(nni_id_map *, uint64_t); +extern int nni_id_set(nni_id_map *, uint64_t, void *); +extern int nni_id_alloc(nni_id_map *, uint64_t *, void *); +extern int nni_id_alloc32(nni_id_map *, uint32_t *, void *); +extern int nni_id_remove(nni_id_map *, uint64_t); +extern void nni_id_map_sys_fini(void); +extern bool nni_id_visit(nni_id_map *, uint64_t *, void **, uint32_t *); +extern uint32_t nni_id_count(const nni_id_map *); #define NNI_ID_MAP_INITIALIZER(min, max, flags) \ { \ |
