alf_task_create - Creates a task and allows you to add work blocks to the work queue of the task.
int alf_task_create(alf_task_desc_handle_t task_desc_handle, void* p_task_context_data, unsigned int num_instances, unsigned int tsk_attr, unsigned int wb_dist_size, alf_task_handle_t *p_task_handle);
Parameters | |
task_desc_handle [IN] | Handle to a task_desc structure. |
p_task_context_data [IN] | Pointer to the task context data for this task. The structure and size for the task context have been defined through alf_task_desc_add_task_ctx_entry. If there is no task_context, a NULL pointer can be provided. |
num_instances [IN] | Number of instances of the task, only used when ALF_TASK_ATTR_SCHED_FIXED is provided. |
tsk_attr [IN] | Attribute for a task. This value can be set to a bit-wise
OR to one of the following:
|
wb_dist_size [IN] | The specified block distribution bundle size in number of work blocks per distribution unit. A 0 (zero) value is treated as 1 (one). Refer to Work block scheduling for more details about work block distribution. |
p_task_handle [OUT] | Returns a handle to the created task. The content of the pointer is not modified if the call returns failure. |
This function creates a task and allows you to enqueue work blocks to the task. The task remains in a pending status until the following condition is met: All dependencies are satisfied and either at least one work block is added or the task is finalized by calling alf_task_finalize.
0 | Successful |
less than 0 | Errors occurred:
|