1 /* 2 * Copyright (c) 2009-2022 Huawei Technologies Co., Ltd. All rights reserved. 3 * 4 * UniProton is licensed under Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * http://license.coscl.org.cn/MulanPSL2 8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11 * See the Mulan PSL v2 for more details. 12 * Create: 2009-12-22 13 * Description: tick模块的模块内头文件 14 */ 15 #ifndef PRT_TICK_INTERNAL_H 16 #define PRT_TICK_INTERNAL_H 17 18 #include "prt_err_external.h" 19 #include "prt_sys_external.h" 20 #include "prt_cpu_external.h" 21 #include "prt_tick_external.h" 22 #include "prt_task_external.h" 23 #include "prt_hwi_external.h" 24 #include "prt_swtmr_external.h" 25 #include "prt_cpup_external.h" 26 #include "prt_hook_external.h" 27 #include "prt_irq_external.h" 28 29 /* 30 * 模块内宏定义 31 */ 32 #define OS_SWTMR_SCAN() \ 33 do { \ 34 if (g_swtmrScanHook != NULL) { \ 35 g_swtmrScanHook(); \ 36 } \ 37 } while (0) 38 39 #define OS_TICK_TASK_ENTRY() \ 40 do { \ 41 if (g_tickTaskEntry != NULL) { \ 42 g_tickTaskEntry(); \ 43 } \ 44 } while (0) 45 46 #define TSKMON_TICK_RUN() \ 47 do { \ 48 if (g_tskMonHook != NULL) { \ 49 g_tskMonHook(); \ 50 } \ 51 } while (0) 52 53 #define TICK_USER_HOOK_RUN() \ 54 do { \ 55 if (g_tickUsrHook != NULL) { \ 56 g_tickUsrHook(); \ 57 } \ 58 } while (0) 59 60 /* 61 * 模块内数据结构定义 62 */ 63 extern TickHandleFunc g_tickUsrHook; 64 65 #endif /* PRT_TICK_INTERNAL_H */ 66