Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.59 KB

demi_pop.md

File metadata and controls

52 lines (30 loc) · 1.59 KB

demi_pop()

Name

demi_pop - Asynchronously pops a scatter-gather array from an I/O queue.

Synopsis

#include <demi/libos.h>

int demi_pop(demi_qtoken_t *qt_out, int qd);

Description

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().

Return Value

On success, zero is returned. On error, a positive error code is returned.

Errors

On error, one of the following positive error codes is returned:

  • EBADF - The I/O queue descriptor qd does not refer to a valid I/O queue.
  • EAGAIN - Demikernel failed to create an asynchronous co-routine to handle the demi_pop() operation.

Conforming To

Error codes are conformant to POSIX.1-2017.

Bugs

Demikernel may fail with error codes that are not listed in this manual page.

Disclaimer

Any behavior that is not documented in this manual page is unintentional and should be reported.

See Also

demi_sgaalloc(), demi_sgafree(), demi_wait() and demi_wait_any().