diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-06-09 06:36:19 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-06-09 06:36:19 -0700 |
| commit | c50111c825d2a6724ea49ea72cee0eeb420ec432 (patch) | |
| tree | 0cf8aeb3113b6bf4861b0420212383df480a0237 /src/core/init.c | |
| parent | 4044f93afb21f2a5700eb312f1daa6e2a0152ab6 (diff) | |
| download | nng-c50111c825d2a6724ea49ea72cee0eeb420ec432.tar.gz nng-c50111c825d2a6724ea49ea72cee0eeb420ec432.tar.bz2 nng-c50111c825d2a6724ea49ea72cee0eeb420ec432.zip | |
Eliminate pipes global idhash.
Diffstat (limited to 'src/core/init.c')
| -rw-r--r-- | src/core/init.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/core/init.c b/src/core/init.c index 3339b532..c2fe3aff 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -11,12 +11,6 @@ #include <stdlib.h> #include <stdio.h> -nni_idhash *nni_pipes; -nni_mtx *nni_idlock; - -static nni_idhash nni_pipes_x; -static nni_mtx nni_idlock_x; - static int nni_init_helper(void) { @@ -55,31 +49,6 @@ nni_init_helper(void) nni_taskq_sys_fini(); return (rv); } - if ((rv = nni_mtx_init(&nni_idlock_x)) != 0) { - nni_pipe_sys_fini(); - nni_ep_sys_fini(); - nni_sock_sys_fini(); - nni_random_sys_fini(); - nni_timer_sys_fini(); - nni_taskq_sys_fini(); - return (rv); - } - if ((rv = nni_idhash_init(&nni_pipes_x)) != 0) { - nni_mtx_fini(&nni_idlock_x); - nni_pipe_sys_fini(); - nni_ep_sys_fini(); - nni_sock_sys_fini(); - nni_random_sys_fini(); - nni_timer_sys_fini(); - nni_taskq_sys_fini(); - return (rv); - } - nni_idhash_set_limits(&nni_pipes_x, 1, 0x7fffffff, - (nni_random() & 0x7ffffffe) + 1); - - nni_idlock = &nni_idlock_x; - nni_pipes = &nni_pipes_x; - nni_tran_sys_init(); return (0); } @@ -95,8 +64,6 @@ nni_init(void) void nni_fini(void) { - nni_idhash_fini(&nni_pipes_x); - nni_mtx_fini(&nni_idlock_x); nni_tran_sys_fini(); nni_ep_sys_fini(); nni_sock_sys_fini(); |
