• 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_QUEUE_EXT_H
16 #define MOCK_FFRT_INNER_API_C_QUEUE_EXT_H
17 
18 #include <stdbool.h>
19 #include "c/queue.h"
20 
21 typedef enum {
22 
23     ffrt_queue_eventhandler_interactive = 3,
24     ffrt_queue_eventhandler_adapter = 4,
25     ffrt_queue_inner_max,
26 } ffrt_inner_queue_type_t;
27 
28 typedef enum {
29 
30     ffrt_inner_queue_priority_vip = 0,
31 
32     ffrt_inner_queue_priority_immediate,
33 
34     ffrt_inner_queue_priority_high,
35 
36     ffrt_inner_queue_priority_low,
37 
38     ffrt_inner_queue_priority_idle,
39 } ffrt_inner_queue_priority_t;
40 
ffrt_queue_has_task(ffrt_queue_t queue,const char * name)41 inline FFRT_C_API bool ffrt_queue_has_task(ffrt_queue_t queue, const char *name)
42 {
43     return true;
44 }
45 
ffrt_queue_cancel_all(ffrt_queue_t queue)46 inline FFRT_C_API void ffrt_queue_cancel_all(ffrt_queue_t queue)
47 {}
48 
ffrt_queue_cancel_and_wait(ffrt_queue_t queue)49 inline FFRT_C_API void ffrt_queue_cancel_and_wait(ffrt_queue_t queue)
50 {}
51 
ffrt_queue_cancel_by_name(ffrt_queue_t queue,const char * name)52 inline FFRT_C_API int ffrt_queue_cancel_by_name(ffrt_queue_t queue, const char *name)
53 {
54     return 0;
55 }
56 
ffrt_queue_is_idle(ffrt_queue_t queue)57 inline FFRT_C_API bool ffrt_queue_is_idle(ffrt_queue_t queue)
58 {
59     return true;
60 }
61 
ffrt_queue_dump(ffrt_queue_t queue,const char * tag,char * buf,uint32_t len,bool history_info)62 inline FFRT_C_API int ffrt_queue_dump(ffrt_queue_t queue, const char *tag, char *buf, uint32_t len, bool history_info)
63 {
64     return 0;
65 }
66 
ffrt_queue_size_dump(ffrt_queue_t queue,ffrt_inner_queue_priority_t priority)67 inline FFRT_C_API int ffrt_queue_size_dump(ffrt_queue_t queue, ffrt_inner_queue_priority_t priority)
68 {
69     return 0;
70 }
71 
ffrt_queue_set_eventhandler(ffrt_queue_t queue,void * eventhandler)72 inline FFRT_C_API void ffrt_queue_set_eventhandler(ffrt_queue_t queue, void *eventhandler)
73 {}
74 
ffrt_get_current_queue_eventhandler(void)75 inline FFRT_C_API void *ffrt_get_current_queue_eventhandler(void)
76 {
77     return {};
78 }
79 
ffrt_concurrent_queue_wait_all(ffrt_queue_t queue)80 inline FFRT_C_API int ffrt_concurrent_queue_wait_all(ffrt_queue_t queue)
81 {
82     return 0;
83 }
84 
85 #endif