aboutsummaryrefslogtreecommitdiff
path: root/src/core/aio.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-26 08:55:46 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-26 08:56:06 -0800
commitd02a320cffc82de8437c28869355a403069b3b21 (patch)
treeec4d7f49f3545f72ee414fcaee2b5de02e3e115f /src/core/aio.h
parentd6ed8c84ea066c8a6b27dc052425e042ea06b738 (diff)
downloadnng-d02a320cffc82de8437c28869355a403069b3b21.tar.gz
nng-d02a320cffc82de8437c28869355a403069b3b21.tar.bz2
nng-d02a320cffc82de8437c28869355a403069b3b21.zip
nni_aio_start: introduce nni_aio_start to replace aio_begin, schedule, and defer
Also make nni_aio_sleep use it.
Diffstat (limited to 'src/core/aio.h')
-rw-r--r--src/core/aio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/aio.h b/src/core/aio.h
index 8628d8ef..b09b6e49 100644
--- a/src/core/aio.h
+++ b/src/core/aio.h
@@ -175,6 +175,11 @@ extern int nni_aio_schedule(nni_aio *, nni_aio_cancel_fn, void *);
// or was canceled before this call (but after nni_aio_begin).
extern bool nni_aio_defer(nni_aio *, nni_aio_cancel_fn, void *);
+// nni_aio_start should be called before any asynchronous operation
+// is filed. It need not be called for completions that are synchronous
+// at job submission.
+extern bool nni_aio_start(nni_aio *, nni_aio_cancel_fn, void *);
+
extern void nni_sleep_aio(nni_duration, nni_aio *);
// nni_aio_completion_list is used after removing the aio from an