From 4f5e11c391c4a8f1b2731aee5ad47bc0c925042a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 15 Aug 2020 14:09:17 -0700 Subject: fixes #1289 zerotier should have it's own copy of the id hashing code fixes #1288 id allocation can overallocate fixes #1126 consider removing lock from idhash This substantially refactors the id hash code, giving a cleaner API, and eliminating a extra locking as well as some wasteful allocations. The ZeroTier code has it's own copy, that is 64-bit friendly, as the rest of the consumers need only a simpler 32-bit API. --- src/core/sockimpl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/sockimpl.h') diff --git a/src/core/sockimpl.h b/src/core/sockimpl.h index 16596c63..732e2285 100644 --- a/src/core/sockimpl.h +++ b/src/core/sockimpl.h @@ -50,8 +50,8 @@ struct nni_dialer { nni_mtx d_mtx; nni_list d_pipes; nni_aio * d_user_aio; - nni_aio * d_con_aio; - nni_aio * d_tmo_aio; // backoff timer + nni_aio d_con_aio; + nni_aio d_tmo_aio; // backoff timer nni_duration d_maxrtime; // maximum time for reconnect nni_duration d_currtime; // current time for reconnect nni_duration d_inirtime; // initial time for reconnect @@ -91,8 +91,8 @@ struct nni_listener { bool l_closing; // close started (shutdown) nni_atomic_flag l_started; nni_list l_pipes; - nni_aio * l_acc_aio; - nni_aio * l_tmo_aio; + nni_aio l_acc_aio; + nni_aio l_tmo_aio; nni_reap_item l_reap; nni_listener_stats l_stats; }; -- cgit v1.2.3-70-g09d2