diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/aio.c | 8 | ||||
| -rw-r--r-- | src/core/aio.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/aio.c b/src/core/aio.c index 128178c8..9b0fe4d5 100644 --- a/src/core/aio.c +++ b/src/core/aio.c @@ -74,7 +74,7 @@ static int nni_aio_expire_q_cnt; static nni_reap_list aio_reap_list = { .rl_offset = offsetof(nni_aio, a_reap_node), - .rl_func = (nni_cb) nni_aio_free, + .rl_func = nni_aio_free_cb, }; static void nni_aio_expire_add(nni_aio *); @@ -147,6 +147,12 @@ nni_aio_free(nni_aio *aio) } void +nni_aio_free_cb(void *aio) +{ + nni_aio_free((nni_aio *) aio); +} + +void nni_aio_reap(nni_aio *aio) { if (aio != NULL && aio->a_init) { diff --git a/src/core/aio.h b/src/core/aio.h index e0b5a388..a1b06e1d 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -44,6 +44,7 @@ extern nng_err nni_aio_alloc(nni_aio **, nni_cb, void *arg); // This must only be called on an object that was allocated // with nni_aio_allocate. extern void nni_aio_free(nni_aio *aio); +extern void nni_aio_free_cb(void *aio); // nni_aio_stop cancels any unfinished I/O, running completion callbacks, // but also prevents any new operations from starting (nni_aio_start will |
