update ffrt interface

Signed-off-by: zhuguoyang <zhuguoyang@h-partners.com>
This commit is contained in:
zhuguoyang 2024-04-10 11:07:53 +08:00
parent a6495fede3
commit 06e66b7341
2 changed files with 12 additions and 10 deletions

View File

@ -52,14 +52,14 @@
*/
typedef enum {
/** should be distributed at once if possible, handle time equals to send time, prior to high level */
ffrt_task_priority_immediate = 0,
ffrt_queue_priority_immediate = 0,
/** high priority, sorted by handle time, prior to low level. */
ffrt_task_priority_high,
ffrt_queue_priority_high,
/** low priority, sorted by handle time, prior to idle level. */
ffrt_task_priority_low,
ffrt_queue_priority_low,
/** lowest priority, sorted by handle time, only distribute when there is no other level inside queue. */
ffrt_task_priority_idle,
} ffrt_task_priority_t;
ffrt_queue_priority_idle,
} ffrt_queue_priority_t;
/**
* @brief Enumerates the task QoS types.
@ -214,11 +214,11 @@ enum qos_default {
};
using qos = int;
enum task_priority {
immediate = ffrt_task_priority_immediate,
high = ffrt_task_priority_high,
low = ffrt_task_priority_low,
idle = ffrt_task_priority_idle,
enum queue_priority {
immediate = ffrt_queue_priority_immediate,
high = ffrt_queue_priority_high,
low = ffrt_queue_priority_low,
idle = ffrt_queue_priority_idle,
};
enum queue_type {

View File

@ -20,11 +20,13 @@
#include "cpp/condition_variable.h"
#include "cpp/sleep.h"
#include "cpp/queue.h"
#include "c/timer.h"
#else
#include "c/task.h"
#include "c/mutex.h"
#include "c/condition_variable.h"
#include "c/sleep.h"
#include "c/queue.h"
#include "c/timer.h"
#endif
#endif