alf_dataset_buffer_add

NAME

alf_dataset_buffer_add - Adds a data buffer to the data set.

SYNOPSIS

int alf_dataset_buffer_add(alf_dataset_handle_t dataset, void *buffer, unsigned long long size, ALF_CACHE_DATASET_ACCESS_MODE_T access_mode);

Parameters  
buffer Address of the buffer to be added
size Size of the buffer
access mode Access mode for the buffer. A buffer can have either of the following access modes:
  • ALF_DATASET_READ_ONLY: The data set buffer is read-only. Work blocks referencing the data in this buffer cannot update this buffer as an output buffer.
  • ALF_DATASET_WRITE_ONLY: The data set buffer is write-only. Work blocks referencing the data in this buffer as input data result in indeterminate behavior. If the application does not write to this buffer during a task's execution, the content of the buffer is indeterminate.
  • ALF_DATASET_READ_WRITE: The data set buffer allows both read and write access. Work blocks can use this buffer as input buffers and output buffers and/or in out buffers. If the application does not update the this buffer content through a task, its content is indeterminate.

DESCRIPTION

This function adds a data buffer to the data set.

RETURN VALUE

0 Success
less than 0 Errors occurred:
  • ALF_ERR_INVAL: Invalid input argument
  • ALF_ERR_BADF: Invalid ALF handle
  • ALF_ERR_PERM: The API call is not permitted with the current calling context. The dataset has been associated with a task and thus closed from further buffer additions.
  • ALF_ERR_GENERIC: Generic internal errors
Related reference
alf_dataset_handle_t
alf_dataset_create
alf_dataset_destroy
alf_task_dataset_associate