demi_sgafree
- Releases a scatter-gather array.
#include <demi/sga.h>
#include <demi/types.h> /* For demi_sgarray_t. */
int demi_sgafree(demi_sgarray_t *sga);
demi_sgafree()
releases the scatter-gather array pointed to by sga
.
If the application attempts to release a scatter-gather array before all pending push operations on that scatter-gather array complete, the behavior is undefined.
On success, zero is returned. On error, a positive error code is returned.
On error, one of the following positive error codes is returned:
EINVAL
- Thesga
argument does not point to a valid scatter-gather array.EINVAL
- The scatter-gather array pointed to bysga
has an invalid size.
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_push()
and demi_sgaalloc()
.