From 6e5f6a26beec0a44d25625cacb5095cdc7a94146 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 20 Aug 2018 09:00:46 -0700 Subject: fixes #664 aio cancellation could be better This changes the signature of the aio cancellation routines to take the argument for cancellation directly, so we do not need to lookup the argument using the nni_aio_get_prov_data. We should probably consider eliminating nni_aio_get_prov_data, and co, and changing the prov_extra to reflect prov_data. Later. --- src/protocol/reqrep0/req.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocol/reqrep0/req.c') diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c index 6220697b..49d0ea66 100644 --- a/src/protocol/reqrep0/req.c +++ b/src/protocol/reqrep0/req.c @@ -590,9 +590,9 @@ req0_ctx_reset(req0_ctx *ctx) } static void -req0_ctx_cancel_recv(nni_aio *aio, int rv) +req0_ctx_cancel_recv(nni_aio *aio, void *arg, int rv) { - req0_ctx * ctx = nni_aio_get_prov_data(aio); + req0_ctx * ctx = arg; req0_sock *s = ctx->sock; nni_mtx_lock(&s->mtx); @@ -666,9 +666,9 @@ req0_ctx_recv(void *arg, nni_aio *aio) } static void -req0_ctx_cancel_send(nni_aio *aio, int rv) +req0_ctx_cancel_send(nni_aio *aio, void *arg, int rv) { - req0_ctx * ctx = nni_aio_get_prov_data(aio); + req0_ctx * ctx = arg; req0_sock *s = ctx->sock; nni_mtx_lock(&s->mtx); -- cgit v1.2.3-70-g09d2