summaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_pollq.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-05 17:21:55 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-06 15:23:24 -0700
commite52d205799be922db0c1c63ae48a4921707183b4 (patch)
tree897fb0bc3c0318af1e6c4ced7296efd7f88644dc /src/platform/posix/posix_pollq.h
parent916ba1ab23aa50b855fd795f095eaedb328e84d9 (diff)
downloadnng-e52d205799be922db0c1c63ae48a4921707183b4.tar.gz
nng-e52d205799be922db0c1c63ae48a4921707183b4.tar.bz2
nng-e52d205799be922db0c1c63ae48a4921707183b4.zip
fixes #393 panic on illumos - epoll assertion error
This replaces the epoll support with proper illumos/SunOS port events. The port event support is structured so that it actually is superior to epoll and kqueue, because it avoids a single master lock on the poller. In the future we will explore this for macOS and Linux pollers.
Diffstat (limited to 'src/platform/posix/posix_pollq.h')
-rw-r--r--src/platform/posix/posix_pollq.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/platform/posix/posix_pollq.h b/src/platform/posix/posix_pollq.h
index bb441c7b..2c855da1 100644
--- a/src/platform/posix/posix_pollq.h
+++ b/src/platform/posix/posix_pollq.h
@@ -1,6 +1,6 @@
//
-// Copyright 2017 Garrett D'Amore <garrett@damore.org>
-// Copyright 2017 Capitar IT Group BV <info@capitar.com>
+// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -35,6 +35,8 @@ struct nni_posix_pollq_node {
int revents; // events received
void * data; // user data
nni_cb cb; // user callback on event
+ nni_mtx mx;
+ nni_cv cv;
};
extern nni_posix_pollq *nni_posix_pollq_get(int);
@@ -46,7 +48,6 @@ extern void nni_posix_pollq_fini(nni_posix_pollq_node *);
extern int nni_posix_pollq_add(nni_posix_pollq_node *);
extern void nni_posix_pollq_remove(nni_posix_pollq_node *);
extern void nni_posix_pollq_arm(nni_posix_pollq_node *, int);
-extern void nni_posix_pollq_disarm(nni_posix_pollq_node *, int);
#endif // NNG_PLATFORM_POSIX