1 /*
2  * Copyright (c) 2023 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 FFRT_API_C_FFRT_DUMP_H
16 #define FFRT_API_C_FFRT_DUMP_H
17 #include <stdint.h>
18 #include "type_def_ext.h"
19 
20 typedef enum {
21     DUMP_INFO_ALL = 0,
22     DUMP_TASK_STATISTIC_INFO
23 } ffrt_dump_cmd_t;
24 
25 typedef void(*ffrt_task_timeout_cb)(uint64_t gid, const char *msg, uint32_t size);
26 
27 FFRT_C_API int ffrt_dump(ffrt_dump_cmd_t cmd, char *buf, uint32_t len);
28 FFRT_C_API ffrt_task_timeout_cb ffrt_task_timeout_get_cb(void);
29 FFRT_C_API void ffrt_task_timeout_set_cb(ffrt_task_timeout_cb cb);
30 FFRT_C_API uint32_t ffrt_task_timeout_get_threshold(void);
31 FFRT_C_API void ffrt_task_timeout_set_threshold(uint32_t threshold_ms);
32 #endif /* FFRT_API_C_FFRT_DUMP_H */