aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-06-24 14:13:09 -0700
committerGarrett D'Amore <garrett@damore.org>2017-06-24 14:13:09 -0700
commit3678880128c98f522dc3608535e5351b1d5bc4c4 (patch)
tree16790cd2947fe5988e5fce0dd893abc4fb032207 /src/core/endpt.c
parent0a51aa7bfc88d55b98fdde0d497b072e6911457d (diff)
downloadnng-3678880128c98f522dc3608535e5351b1d5bc4c4.tar.gz
nng-3678880128c98f522dc3608535e5351b1d5bc4c4.tar.bz2
nng-3678880128c98f522dc3608535e5351b1d5bc4c4.zip
Remove stale endpoint reap stuff. Note that req/rep fails sometimes.
Diffstat (limited to 'src/core/endpt.c')
-rw-r--r--src/core/endpt.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index 00690cd4..e3f436ef 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -19,35 +19,6 @@ static nni_objhash *nni_eps = NULL;
static void *nni_ep_ctor(uint32_t);
static void nni_ep_dtor(void *);
-// Because we can't reap threads from themselves, we need to have a separate
-// task to reap endpoints. We use one global task to do this, and we just
-// add to the reap list as needed.
-static nni_taskq_ent nni_ep_reap_tqe;
-static nni_mtx nni_ep_reap_mx;
-static nni_list nni_ep_reap_list;
-
-static void
-nni_ep_reaper(void *arg)
-{
- nni_ep *ep;
-
- NNI_ARG_UNUSED(arg);
-
- nni_mtx_lock(&nni_ep_reap_mx);
- while ((ep = nni_list_first(&nni_ep_reap_list)) != NULL) {
- nni_list_remove(&nni_ep_reap_list, ep);
-
- nni_mtx_unlock(&nni_ep_reap_mx);
- nni_thr_fini(&ep->ep_thr);
- nni_objhash_unref(nni_eps, ep->ep_id);
- nni_mtx_lock(&nni_ep_reap_mx);
-
- continue;
- }
-
- nni_mtx_unlock(&nni_ep_reap_mx);
-}
-
int
nni_ep_sys_init(void)
@@ -58,15 +29,6 @@ nni_ep_sys_init(void)
if (rv != 0) {
return (rv);
}
- rv = nni_mtx_init(&nni_ep_reap_mx);
- if (rv != 0) {
- nni_objhash_fini(nni_eps);
- nni_eps = NULL;
- return (rv);
- }
-
- nni_ep_list_init(&nni_ep_reap_list);
- nni_taskq_ent_init(&nni_ep_reap_tqe, nni_ep_reaper, NULL);
return (rv);
}
@@ -74,8 +36,6 @@ nni_ep_sys_init(void)
void
nni_ep_sys_fini(void)
{
- nni_taskq_cancel(NULL, &nni_ep_reap_tqe);
- nni_mtx_fini(&nni_ep_reap_mx);
nni_objhash_fini(nni_eps);
nni_eps = NULL;
}