• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef MOCK_FFRT_INNER_API_C_TASK_H
16 #define MOCK_FFRT_INNER_API_C_TASK_H
17 #include <stdint.h>
18 #include <stdbool.h>
19 #include "type_def_ext.h"
ffrt_skip(ffrt_task_handle_t handle)20 inline FFRT_C_API int ffrt_skip(ffrt_task_handle_t handle)
21 {
22     return 0;
23 }
24 
ffrt_set_cgroup_attr(ffrt_qos_t qos,ffrt_os_sched_attr * attr)25 inline FFRT_C_API int ffrt_set_cgroup_attr(ffrt_qos_t qos, ffrt_os_sched_attr *attr)
26 {
27     return 0;
28 }
29 
ffrt_restore_qos_config(void)30 inline FFRT_C_API void ffrt_restore_qos_config(void)
31 {}
32 
ffrt_set_cpu_worker_max_num(ffrt_qos_t qos,uint32_t num)33 inline FFRT_C_API int ffrt_set_cpu_worker_max_num(ffrt_qos_t qos, uint32_t num)
34 {
35     return 0;
36 }
37 
ffrt_task_attr_set_notify_worker(ffrt_task_attr_t * attr,bool notify)38 inline FFRT_C_API void ffrt_task_attr_set_notify_worker(ffrt_task_attr_t *attr, bool notify)
39 {}
40 
ffrt_notify_workers(ffrt_qos_t qos,int number)41 inline FFRT_C_API void ffrt_notify_workers(ffrt_qos_t qos, int number)
42 {}
43 
ffrt_this_queue_get_id(void)44 inline FFRT_C_API int64_t ffrt_this_queue_get_id(void)
45 {
46     return 0;
47 }
48 
ffrt_enable_worker_escape(uint64_t one_stage_interval_ms,uint64_t two_stage_interval_ms,uint64_t three_stage_interval_ms,uint64_t one_stage_worker_num,uint64_t two_stage_worker_num)49 inline FFRT_C_API int ffrt_enable_worker_escape(uint64_t one_stage_interval_ms, uint64_t two_stage_interval_ms,
50     uint64_t three_stage_interval_ms, uint64_t one_stage_worker_num, uint64_t two_stage_worker_num)
51 {
52     return 0;
53 }
54 
ffrt_disable_worker_escape(void)55 inline FFRT_C_API void ffrt_disable_worker_escape(void)
56 {}
57 
ffrt_set_sched_mode(ffrt_qos_t qos,ffrt_sched_mode mode)58 inline FFRT_C_API void ffrt_set_sched_mode(ffrt_qos_t qos, ffrt_sched_mode mode)
59 {}
60 
61 #endif