diff options
Diffstat (limited to 'src/core/aio.h')
| -rw-r--r-- | src/core/aio.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/aio.h b/src/core/aio.h index b5db29c9..33fe07cb 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -39,8 +39,10 @@ struct nni_aio { nni_task a_task; // Read/write operations. - nni_iov a_iov[4]; - int a_niov; + nni_iov *a_iov; + int a_niov; + nni_iov a_iovinl[4]; // inline IOVs - when the IOV list is short + int a_niovalloc; // number of allocated IOVs // Message operations. nni_msg *a_msg; @@ -126,6 +128,11 @@ extern void nni_aio_set_output(nni_aio *, int, void *); // nni_get_output returns an output previously stored on the AIO. extern void *nni_aio_get_output(nni_aio *, int); +// nni_aio_set_iov sets an IOV (scatter/gather vector) on the AIO. +// Up to 4 may be set without any possibility of failure, more than that +// may require an allocation and hence fail due to NNG_ENOMEM. +extern int nni_aio_set_iov(nni_aio *, int, nng_iov *); + // XXX: These should be refactored in terms of generic inputs and outputs. extern void nni_aio_set_msg(nni_aio *, nni_msg *); extern nni_msg *nni_aio_get_msg(nni_aio *); |
