From 537e2eda8d9fda2001295c835a4720def6a237f1 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 21 Jul 2017 02:46:01 -0700 Subject: 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. --- src/core/aio.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/aio.h') 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]; -- cgit v1.2.3-70-g09d2