From d02a320cffc82de8437c28869355a403069b3b21 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 26 Dec 2024 08:55:46 -0800 Subject: nni_aio_start: introduce nni_aio_start to replace aio_begin, schedule, and defer Also make nni_aio_sleep use it. --- src/core/aio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/aio.h') 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 -- cgit v1.2.3-70-g09d2