alf_task_query

NAME

alf_task_query - Queries the current status of a task.

SYNOPSIS

int alf_task_query( alf_task_handle_t task_handle, unsigned int *p_unfinished_wbs, unsigned int *p_total_wbs);

Parameters  
task_handle [IN] The task handle to be checked.
p_unfinished_wbs [OUT] A pointer to an integer buffer where the number of unfinished work blocks of this task is returned. When a NULL pointer is given, the return value is ignored. On error, a returned value is not defined.
p_total_wbs [OUT] A pointer to an integer buffer where the total number of submitted work blocks of this task is returned. When a NULL pointer is given, the return value is ignored. On error, a returned value is not defined.

DESCRIPTION

This function queries the current status of a task.

RETURN VALUE

> 1 The task is pending or ready to run.
1 The task is currently running.
0 The task finished normally.
less than 0 Errors occurred:
  • ALF_ERR_INVAL: Invalid input argument.
  • ALF_ERR_BADF: Invalid task handle.
  • ALF_ERR_NODATA: The task was explicitly destroyed.
  • ALF_ERR_GENERIC: Generic internal errors.
Related reference
alf_task_handle_t
alf_task_desc_handle_t
alf_task_desc_create
alf_task_desc_destroy
alf_task_desc_ctx_entry_add
alf_task_desc_set_int32
alf_task_desc_set_int64
alf_task_create
alf_task_finalize
alf_task_wait
alf_task_destroy
alf_task_depends_on
alf_task_event_handler_register