-
Notifications
You must be signed in to change notification settings - Fork 24
Pack and Unpack
Giuseppe Congiu edited this page Apr 2, 2020
·
15 revisions
int yaksa_ipack(const void *inbuf, uintptr_t incount, yaksa_type_t type,
uintptr_t inoffset, void *outbuf, uintptr_t max_pack_bytes,
uintptr_t *actual_pack_bytes, yaksa_request_t *request)
- Pack the data represented by (incount, type) tuple into a contiguous buffer
- Parameters
- [in]
inbuf
: input buffer from which data is being packed - [in]
incount
: number of elements of the datatype representing the layout - [in]
type
: datatype representing the layout - [in]
inoffset
: number of bytes to skip from the layout represented by the (incount, type) tuple - [out]
outbuf
: output buffer in which data is being packed - [in]
max_pack_bytes
: maximum number of bytes that can be packed in the output buffer - [out]
actual_pack_bytes
: actual number of bytes that were packed in the output buffer - [out]
request
: request handle associated with the operation (YAKSA_REQUEST__NULL
if the request already completed)
- [in]
- Return values
- On success,
YAKSA_SUCCESS
is returned. - On error, a non-zero error code is returned.
- On success,
int yaksa_iunpack(const void *inbuf, uintptr_t insize, void *outbuf,
uintptr_t outcount, yaksa_type_t type, uintptr_t outoffset,
yaksa_request_t *request)
- Unpack data from a contiguous buffer into a buffer represented by the (incount, type) touple
- Parameters
- [in]
inbuf
: input buffer from which data is being unpacked - [in]
insize
: number of bytes in the input buffer - [out]
outbuf
: output buffer into which data is being unpacked - [out]
outcount
: number of elements of the data representing the layout - [in]
type
: datatype representing the layout - [out]
outoffset
: number of bytes to skip from the layout represented by the (incount, type) tuple - [out]
request
: request handle associated with the operation (YAKSA_REQUEST__NULL
if the request already completed)
- [in]
- Return values
- On success,
YAKSA_SUCCESS
is returned. - On error, a non-zero error code is returned.
- On success,
int yaksa_request_wait(yaksa_request_t request)
- Wait till a request has completed
- Parameters
- [in]
request
: the request object that needs to be waited up on
- [in]
- Return values
- On success,
YAKSA_SUCCESS
is returned. - On error, a non-zero error code is returned.
- On success,
int yaksa_request_test(yaksa_request_t request, int *completed)
- Test to see if a request has completed
- Parameters
- [in]
request
: the request object that needs to be tested - [out]
completed
: flag to tell the caller whether the request object has completed
- [in]
- Return values
- On success,
YAKSA_SUCCESS
is returned. - On error, a non-zero error code is returned.
- On success,