diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-07 16:33:56 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-07 16:33:56 -0700 |
| commit | a3719a20ad9cb7e09ba59f521011446e7aafc914 (patch) | |
| tree | e4163dddec409ee2d11fa719b3129fc5c7eef31c | |
| parent | 24e24c8ac8d05c1e72ef5d71029d24e8832b49a4 (diff) | |
| download | nng-a3719a20ad9cb7e09ba59f521011446e7aafc914.tar.gz nng-a3719a20ad9cb7e09ba59f521011446e7aafc914.tar.bz2 nng-a3719a20ad9cb7e09ba59f521011446e7aafc914.zip | |
Remove unused idhash_reclaim.
| -rw-r--r-- | src/core/idhash.c | 16 | ||||
| -rw-r--r-- | src/core/idhash.h | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/core/idhash.c b/src/core/idhash.c index a111b53c..943809d7 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -76,22 +76,6 @@ nni_idhash_fini(nni_idhash *h) } void -nni_idhash_reclaim(nni_idhash *h) -{ - nni_mtx_lock(&h->ih_mtx); - - // Reclaim the buffer if we want, but preserve the limits. - if ((h->ih_count == 0) && (h->ih_cap != 0) && (h->ih_walkers == 0)) { - NNI_FREE_STRUCTS(h->ih_entries, h->ih_cap); - h->ih_cap = 0; - h->ih_entries = NULL; - h->ih_minload = 0; - h->ih_maxload = 0; - } - nni_mtx_unlock(&h->ih_mtx); -} - -void nni_idhash_set_limits( nni_idhash *h, uint32_t minval, uint32_t maxval, uint32_t start) { diff --git a/src/core/idhash.h b/src/core/idhash.h index 70740b39..b21a681b 100644 --- a/src/core/idhash.h +++ b/src/core/idhash.h @@ -28,7 +28,6 @@ typedef struct nni_idhash_entry nni_idhash_entry; extern int nni_idhash_init(nni_idhash **); extern void nni_idhash_fini(nni_idhash *); -extern void nni_idhash_reclaim(nni_idhash *); extern void nni_idhash_set_limits(nni_idhash *, uint32_t, uint32_t, uint32_t); extern int nni_idhash_create(nni_idhash **); extern void nni_idhash_destroy(nni_idhash *); |
