alf_accel_task_context_merge

NAME

alf_accel_task_context_merge - Merges the context after a task has stopped running.

SYNOPSIS

int alf_accel_task_context_merge (void* p_task_context_to_be_merged, void* p_task_context);

Parameters  
p_task_context_to_merge[IN] Pointer to the local memory block where the to be merged task context buffer is kept.
p_task_context[IN/OUT] Pointer to the local memory block where the to be target task context buffer is kept.

DESCRIPTION

This function is called by the ALF runtime when a task stops running on an accelerator. The runtime loads the corresponding task context to the memory of an accelerator that is running this task and calls this function to do the context merge.

The ALF runtime only invokes this API only when the task has a task context. If the task does not have a task context or the application does not need to do context merge, you can choose not to implement this API when the programming environment supports weak link or to implement an empty function that returns zero when weak link is not supported.

RETURN VALUE

0 The API call finishes correctly.
less than 0 An error occurred during the call. The error code is passed back to you to be handled.