demi_pop
- Asynchronously pops a scatter-gather array from an I/O queue.
#include <demi/libos.h>
int demi_pop(demi_qtoken_t *qt_out, int qd);
demi_pop()
asynchronously pops a scatter-gather array from an I/O queue.
The qd
parameter is the I/O queue descriptor that is associated with the target I/O queue.
The qt_out
parameter points to the location where the queue token for the demi_pop()
operation should be stored. An
application may use this queue token with demi_wait()
or demi_wait_any()
to block until the operation effectively
completes. When this happens, the scatter-gather array that was popped is made available and the application is
responsible for releasing it afterwards. For information on scatter-gather arrays, see demi_sgaalloc()
and
demi_sgafree()
.
On success, zero is returned. On error, a positive error code is returned.
On error, one of the following positive error codes is returned:
EBADF
- The I/O queue descriptorqd
does not refer to a valid I/O queue.EAGAIN
- Demikernel failed to create an asynchronous co-routine to handle thedemi_pop()
operation.
Error codes are conformant to POSIX.1-2017.
Demikernel may fail with error codes that are not listed in this manual page.
Any behavior that is not documented in this manual page is unintentional and should be reported.
demi_sgaalloc()
, demi_sgafree()
, demi_wait()
and demi_wait_any()
.