task.h

Overview

The task.h file declares the task interfaces in C.

Since: 10

Related module: FFRT

Summary

Functions

Name Description
FFRT_C_API int ffrt_task_attr_init (ffrt_task_attr_t *attr) Initializes a task attribute.
FFRT_C_API void ffrt_task_attr_set_name (ffrt_task_attr_t *attr, const char *name) Sets a task name.
FFRT_C_API const char * ffrt_task_attr_get_name (const ffrt_task_attr_t *attr) Obtains a task name.
FFRT_C_API void ffrt_task_attr_destroy (ffrt_task_attr_t *attr) Destroys a task attribute.
FFRT_C_API void ffrt_task_attr_set_qos (ffrt_task_attr_t *attr, ffrt_qos_t qos) Sets the task QoS.
FFRT_C_API ffrt_qos_tffrt_task_attr_get_qos (const ffrt_task_attr_t *attr) Obtains the task QoS.
FFRT_C_API void ffrt_task_attr_set_delay (ffrt_task_attr_t *attr, uint64_t delay_us) Sets the task delay time.
FFRT_C_API uint64_t ffrt_task_attr_get_delay (const ffrt_task_attr_t *attr) Obtains the task delay time.
FFRT_C_API int ffrt_this_task_update_qos (ffrt_qos_t qos) Updates the task QoS.
FFRT_C_API uint64_t ffrt_this_task_get_id (void) Obtains the task ID.
FFRT_C_API void * ffrt_alloc_auto_managed_function_storage_base (ffrt_function_kind_t kind) Applies for memory for the function execution structure.
FFRT_C_API void ffrt_submit_base (ffrt_function_header_t *f, const ffrt_deps_t *in_deps, const ffrt_deps_t *out_deps, const ffrt_task_attr_t *attr) Submits a task.
FFRT_C_API ffrt_task_handle_tffrt_submit_h_base (ffrt_function_header_t *f, const ffrt_deps_t *in_deps, const ffrt_deps_t *out_deps, const ffrt_task_attr_t *attr) Submits a task, and obtains a task handle.
FFRT_C_API void ffrt_task_handle_destroy (ffrt_task_handle_t handle) Destroys a task handle.
FFRT_C_API void ffrt_wait_deps (const ffrt_deps_t *deps) Waits until the dependent tasks are complete.
FFRT_C_API void ffrt_wait (void) Waits until all submitted tasks are complete.