dax_post - family of functions that post asynchronous DAX requests
cc [ flag... ] file... -ldax [ library...] #include <dax.h> dax_status_t dax_scan_value_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src, dax_vec_t *dst, dax_compare_t op, dax_int_t *val, void *udata); dax_status_t dax_scan_range_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src, dax_vec_t *dst, dax_compare_t op, dax_int_t *lower, dax_int_t *upper, void *udata); dax_status_t dax_translate_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src, dax_vec_t *dst, dax_vec_t *bitmap, unsigned val_width, void *udata); dax_status_t dax_extract_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src, dax_vec_t *dst, void *udata); dax_status_t dax_select_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src, dax_vec_t *dst, dax_vec_t *mask, void *udata); dax_status_t dax_copy_post(dax_queue_t *queue, uint64_t flags, void *src, void *dst, size_t count, void *udata); dax_status_t dax_fill_post(dax_queue_t *queue, uint64_t flags, uint64_t val, void *dst, uint64_t count, unsigned val_width, void *udata); dax_status_t dax_and_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src1, dax_vec_t *src2, dax_vec_t *dst, void *udata); dax_status_t dax_or_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src1, dax_vec_t *src2, dax_vec_t *dst, void *udata); dax_status_t dax_xor_post(dax_queue_t *queue, uint64_t flags, dax_vec_t *src1, dax_vec_t *src2, dax_vec_t *dst, void *udata);
The post functions perform the same operation as their corresponding non-post functions, but asynchronously. You must call the dax_poll() function to check for completion of the operation.
The arguments to the post and non-post functions are the same except for the following:
The post functions take a queue argument instead of a DAX context and post the operation to the specified queue.
The post functions take an additional udata argument and write the udata pointer to the dax_poll_t structure after the operation completes.
The post functions support all flags supported by the corresponding non-post functions except DAX_NOWAIT. Additionally the post functions support the following flags:
Creates a serial dependency between this operation and the subsequent operations posted with the DAX_COND flag. The conditional operation will not start until the serial operation is complete. The next operation submitted to the queue must have the DAX_COND flag set. If it does not, the next operation in the queue after the DAX_ESERIAL request fails with DAX_EINVAL. If the serial operation completes with an error status, the conditional operation completes with the DAX_ESERIAL status.
Creates a serial dependency between this operation and the most recent operation posted with the DAX_SERIAL flag. A request may be flagged as both serial and conditional. The previous operation submitted to the queue must have the DAX_SERIAL or DAX_COND flag set. If it does not, the current operation fails with DAX_EINVAL.
Pipes the output elements to the src->data elements of the next operation posted to the queue and does not write the output elements to dst->data. This flag is advisory only and may be ignored by the implementation under certain conditions. Therefore, you must provide a dst->data buffer that is valid for this operation, and set src->data to the same buffer address in the next operation. If the src->data address does not match the dst->data address, the next operation fails with DAX_EINVAL.
If the implementation uses the pipe, the current operation completes with a dax_poll_t count of 0, and dst->data is not modified. If the implementation ignores the pipe, it writes to dst->data, and starts the next operation, which reads from dst->data.
This flag is not available in libdax version 1.
The flag is similar to the DAX_PIPE_SRC flag, but pipes the output elements to the src->aux_data elements of the next operation. The next operation must not be dax_select_post.
This flag is not available in libdax version 1.
The flag is similar to the DAX_PIPE_SRC flag, but pipes the output elements to the mask->data elements of the next operation. The next operation must be dax_select_post.
This flag is not available in libdax version 1.
If the function returns an error, the operation is not posted.
Operation was posted successfully
Invalid argument
The calling thread did not create the queue
The queue is full
You can use the udata field to associate the client meta-data with a request when it is posted, and identify the request when it completes by using the dax_poll() function.
The DAX_PIPE_XXXX flags improve performance by storing intermediate results in DAX, thereby avoiding read and write operations to memory.
See attributes(5) for descriptions of the following attributes:
|
libdax(3LIB), dax_queue_create(3DAX), dax_poll(3DAX)
In libdax version 2, at most 2 operations may be joined with a pipe. If the second operation pipes to a third, that pipe is ignored.