static void handleYield(void) { tcbSchedDequeue(ksCurThread); tcbSchedAppend(ksCurThread); rescheduleRequired(); }
void timerTick(void) { if (likely(isRunnable(ksCurThread))) { if (ksCurThread->tcbTimeSlice > 1) { ksCurThread->tcbTimeSlice--; } else { ksCurThread->tcbTimeSlice = CONFIG_TIME_SLICE; tcbSchedAppend(ksCurThread); rescheduleRequired(); } } if (CONFIG_NUM_DOMAINS > 1) { ksDomainTime--; if (ksDomainTime == 0) { rescheduleRequired(); } } }
void timerTick(void) { if (likely(thread_state_get_tsType(ksCurThread->tcbState) == ThreadState_Running)) { if (ksCurThread->tcbTimeSlice > 1) { ksCurThread->tcbTimeSlice--; } else { ksCurThread->tcbTimeSlice = CONFIG_TIME_SLICE; tcbSchedAppend(ksCurThread); rescheduleRequired(); } } if (CONFIG_NUM_DOMAINS > 1) { ksDomainTime--; if (ksDomainTime == 0) { rescheduleRequired(); } } }
void timerTick(void) { /* printf("\n========in timertick==========\n"); */ if (likely(isRunnable(ksCurThread))) { if (ksCurThread->tcbTimeSlice > 1) { ksCurThread->tcbTimeSlice--; } else { ksCurThread->tcbTimeSlice = CONFIG_TIME_SLICE; tcbSchedAppend(ksCurThread); rescheduleRequired(); } } if (CONFIG_NUM_DOMAINS > 1) { /* printf("num domain is %d\n", CONFIG_NUM_DOMAINS); */ ksDomainTime--; /* printf("current domain is %d\n", ksCurDomain); printf("domain time is %d\n", ksDomainTime); */ if (ksDomainTime == 0) { /* printf("action is %d\n", ksSchedulerAction); */ rescheduleRequired(); } } }