alf_task_wait - Waits for the specified task to finish processing all work blocks on all the scheduled accelerators.
int alf_task_wait(alf_task_handle_t task_handle, int time_out);
Parameters | |
task_handle [IN] | A task handle that is returned by the alf_create_task API. |
time_out [IN] | A timeout input with the following options for values:
|
This function waits for the specified task to finish processing all work blocks on all the scheduled accelerators. The task must be finalized (alf_task_finalize must be called) before this function is called. Otherwise, an ALF_ERR_PERM is returned. Data referenced by the task's work blocks can only be used safely after this function returns. If the host application updates the data buffers referenced by work blocks or the task context buffer while the task is running, the result can be undetermined. If you need to update the buffer contents, the only safe point is before the ALF_TASK_EVENT_READY task event is handled by the task event handler registered by alf_task_event_handler_register.
0 | All of the accelerators finished the job. |
less than 0 | Errors occurred:
|