aboutsummaryrefslogtreecommitdiff
path: root/src/core/aio.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-21 02:46:01 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-21 02:46:01 -0700
commit537e2eda8d9fda2001295c835a4720def6a237f1 (patch)
tree615d05096e0fe4c8bfbccf31f37c7256381ccd8e /src/core/aio.h
parent07078e1cf761cb6e56e46bde3ade6f792368d7dd (diff)
downloadnng-537e2eda8d9fda2001295c835a4720def6a237f1.tar.gz
nng-537e2eda8d9fda2001295c835a4720def6a237f1.tar.bz2
nng-537e2eda8d9fda2001295c835a4720def6a237f1.zip
Simpler taskq API.
The queue is bound at initialization time of the task, and we call entries just tasks, so we don't have to pass around a taskq pointer across all the calls. Further, nni_task_dispatch is now guaranteed to succeed.
Diffstat (limited to 'src/core/aio.h')
-rw-r--r--src/core/aio.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/aio.h b/src/core/aio.h
index c698ce20..955f84ae 100644
--- a/src/core/aio.h
+++ b/src/core/aio.h
@@ -27,11 +27,11 @@ struct nni_aio {
nni_time a_expire;
// These fields are private to the aio framework.
- nni_mtx a_lk;
- nni_cv a_cv;
- unsigned a_flags;
- int a_refcnt; // prevent use-after-free
- nni_taskq_ent a_tqe;
+ nni_mtx a_lk;
+ nni_cv a_cv;
+ unsigned a_flags;
+ int a_refcnt; // prevent use-after-free
+ nni_task a_task;
// Read/write operations.
nni_iov a_iov[4];