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-10-05 13 * Description: 核架构相关的头文件 14 */ 15 #ifndef PRT_CPU_EXTERNAL_H 16 #define PRT_CPU_EXTERNAL_H 17 18 #include "prt_task.h" 19 #include "prt_attr_external.h" 20 21 #define OS_GOTO_SYS_ERROR() \ 22 do { \ 23 OsAsmIll(); \ 24 } while (0) 25 26 #define OS_GOTO_SYS_ERROR1() OS_GOTO_SYS_ERROR() 27 28 extern void OsAsmIll(void); 29 extern void OsFirstTimeSwitch(void); 30 extern void *OsTskContextInit(U32 taskId, U32 stackSize, uintptr_t *topStack, uintptr_t funcTskEntry); 31 extern void OsTskContextGet(uintptr_t saveAddr, struct TskContext *context); 32 extern void OsTickStartRegSet(U16 tickHwTimerIndex, U32 cyclePerTick); 33 34 #if defined(OS_ARCH_ARMV7_M) 35 #include "../cpu/armv7-m/common/os_cpu_armv7_m_external.h" 36 #endif 37 38 #endif /* PRT_CPU_EXTERNAL_H */ 39