Files
cosyos/System/os_starter.c
T
零中断延迟的RTOS 8b8ed2ee34 update 内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2026-03-10 09:58:13 +00:00

73 lines
1.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**************************************************************************//**
* @item CosyOS-III Kernel
* @file os_starter.c
* @brief 任务启动器(Starter
* @author 迟凯峰
* @version V2.3.2
* @date 2026.03.08
******************************************************************************/
#include "os_var.h"
#include "os_api.h"
#include "sv_com.h"
#include "sv_create.h"
#include "sv_task.h"
#include "ur_api.h"
/**
\brief 任务启动器
\param[in] 任务名称 Starter
\param[in] 任务优先级 SYSCFG_TASKPRIORITY - (SYSCFG_DEBUGGING ? 3 : 1)
\param[in] 任务栈大小 SYSCFG_STACKSIZE_STARTER
\param[in] 安全运行时 0
\param[in] 任务名称文本<br>
遗产模式:"Starter"<br>
标准/兼容模式:[中文:"任务启动器",英文:"Starter"]
\return 无
*/
#if (SYSCFG_DEBUG_LANGUAGE == 0)
#define _taskname "Starter"
#else
#define _taskname "\xC8\xCE\xCE\xF1\xC6\xF4\xB6\xAF\xC6\xF7" /*!< "任务启动器" */
#endif
sCat2Str
(
SYSCFG_STARTERCREATE,
CreateTask(Starter, SYSCFG_TASKPRIORITY - (SYSCFG_DEBUGGING ? 3 : 1), SYSCFG_STACKSIZE_STARTER, 0, _taskname)
)
{
// uScheduleLock();
if(true){
uExtTask(Sysidle);
uStartTask_Ready(Sysidle);
}
#if (OS_TIMINTTOTAL > 0 || OS_TIMQRYTOTAL > 0)
if(true){
s_u8_t i;
#if (OS_TIMINTTOTAL > 0)
i = OS_TIMINTTOTAL;
while(i--){
if(s_timint_handle[i]->hookortask){
sStartTask_TimInt(i);
}
}
#endif
#if (OS_TIMQRYTOTAL > 0)
i = OS_TIMQRYTOTAL;
while(i--){
if(s_timqry_handle[i]->hookortask){
sStartTask_TimQry(i);
}
}
#endif
}
#endif
// uScheduleUnlock();
if(true){
void start_hook(void);
start_hook();
}
uDeleteTasking();
}
#undef _taskname