From 0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Dec 2016 18:08:44 -0800 Subject: Substantial fixes for listen & dialers. At this point listening and dialing operations appear to function properly. As part of this I had to break the close logic up since otherwise we had a loop trying to reap a thread from itself. So there is now a separate reaper thread for pipes per-socket. I also changed lists to be a bit more rigid, and allocations now zero memory initially. (We had bugs due to uninitialized memory, and rather than hunt them all down, lets just init them to sane zero values.) --- src/core/list.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/list.h') diff --git a/src/core/list.h b/src/core/list.h index 822d9621..9d95a527 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -28,6 +28,10 @@ extern void nni_list_init_offset(nni_list *list, size_t offset); #define NNI_LIST_INIT(list, type, field) \ nni_list_init_offset(list, offsetof(type, field)) + +#define NNI_LIST_NODE_INIT(node) \ + { (node)->ln_prev = (node)->ln_next = 0; } + extern void *nni_list_first(nni_list *); extern void *nni_list_last(nni_list *); extern void nni_list_append(nni_list *, void *); @@ -35,7 +39,6 @@ extern void nni_list_prepend(nni_list *, void *); extern void *nni_list_next(nni_list *, void *); extern void *nni_list_prev(nni_list *, void *); extern void nni_list_remove(nni_list *, void *); -extern void nni_list_node_init(nni_list *, void *); #define NNI_LIST_FOREACH(l, it) \ for (it = nni_list_first(l); it != NULL; it = nni_list_next(l, it)) -- cgit v1.2.3-70-g09d2