目录

FFRT

Overview

Provides the Function Flow Runtime (FFRT) C interface. FFRT is a task-based concurrent runtime library that automatically schedules tasks based on task dependencies, freeing developers from manual thread management.

Since: 10

Files

Name Description
condition_variable.h Declares the condition variable APIs in C.
fiber.h

Declares the C interfaces of fibers.

A fiber is a lightweight user-mode thread used to implement efficient task scheduling and context switching in user space.

loop.h Declares the C interfaces of the event loop.
mutex.h Declares the C interfaces of mutexes, which are used to provide mutually exclusive access between concurrent tasks and protect shared resources from race conditions.
queue.h Declares the queue APIs in C.
shared_mutex.h Declares the C interfaces of read-write locks (rwlock).
sleep.h Declares the C interfaces of ffrt_usleep and ffrt_yield.
task.h Declares the C interfaces of FFRT tasks, providing functions such as initialization and destruction of task attributes, setting and obtaining of task QoS, management of task delay time, priority management of concurrent queue tasks, management of task stack size, task submission and scheduling execution, reference count management of task handles, and task waiting.
timer.h

Declares the C interfaces of timers.

Provides timer capabilities based on QoS levels, supports executing a callback function after a specified timeout, and can be used in scenarios such as delayed task scheduling.

type_def.h Declares the common types.