The function uipInterruptServiceEngine() is the RTOS's interrupt handler function.
In this project, I just use TIM1 update interrupt, and since the program jump into function uinInterruptServiceEngine()(in MSP Stack). Some times, the program will run in the step:
1: uip_KERNEL_DISABLE_INTS.
2: if (uipSystemMode != uip_KERNEL_RUNNING)
3:uipScheduler()
Just jump from sentence (uipSchedulerLock != 0) to uipScheduler(), without implement uipGetNextTask() and if (((uipCurrentTaskTCBPtr -> uipTaskState) & uip_TASK_STATE_MASK) == RUNNING_STATE ), why this happend?
VOID uipInterruptServiceEngine(VOID) { /*disable interrrupt*/ uip_KERNEL_DISABLE_INTS; ................... if (uipSchedulerLock != 0) { /* Restore original sys-int-ctrl value */ uip_KERNEL_RESTORE_INTS; return; } uipGetNextTask(); if (uipNextRunningTaskTCBPtr == uipCurrentTaskTCBPtr) { .................. return; } if (((uipCurrentTaskTCBPtr -> uipTaskState) & uip_TASK_STATE_MASK) == RUNNING_STATE ) { uipCurrentTaskTCBPtr -> uipTaskState &= uip_TASK_EXTENDED; uipCurrentTaskTCBPtr -> uipTaskState |= READY_STATE; } uipScheduler(); /* Restore original sys-int-ctrl value */ uip_KERNEL_RESTORE_INTS; }