void OSInit (void) { #if OS_VERSION >= 204 OSInitHookBegin(); /* Call port specific initialization code */ #endif OS_InitMisc(); /* Initialize miscellaneous variables */ OS_InitRdyList(); /* Initialize the Ready List */ OS_InitTCBList(); /* Initialize the free list of OS_TCBs */ OS_InitEventList(); /* Initialize the free list of OS_EVENTs */ #if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0) OS_FlagInit(); /* Initialize the event flag structures */ #endif #if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0) OS_MemInit(); /* Initialize the memory manager */ #endif #if (OS_Q_EN > 0) && (OS_MAX_QS > 0) OS_QInit(); /* Initialize the message queue structures */ #endif OS_InitTaskIdle(); /* Create the Idle Task */ #if OS_TASK_STAT_EN > 0 OS_InitTaskStat(); /* Create the Statistic Task */ #endif #if OS_VERSION >= 204 OSInitHookEnd(); /* Call port specific init. code */ #endif }
void OSInit (void) { OSInitHookBegin(); /* Call port specific initialization code */ OS_InitMisc(); /* Initialize miscellaneous variables */ OS_InitRdyList(); /* Initialize the Ready List */ OS_InitTCBList(); /* Initialize the free list of OS_TCBs */ OS_InitTaskIdle(); /* Create the Idle Task */ // OSInitHookEnd(); /* Call port specific init. code */ }