1 interrupt [TIM0_COMP] void os_timer0_comp(void)
2 {
3 if (g_threadcount > 1)
4 {
5 os_schedule();
6 }
7 }
8 /*
9 interrupt [TIM2_COMP] void os_timer2_comp(void)
10 {
11 // for each timer, see if it's time is up
12 os_thread *temp_thread;
13 os_timer2 *temp_timer;
14
15 temp_thread = g_usedthreads;
16
17 while (temp_thread != NULL)
18 {
19 //temp_timer->progress -= g_timer2_gcd; // subtract the greatest common denominator
20 temp_timer = temp_thread->event_timer2;
21 if (temp_timer != NULL && temp_timer->ready != 1 && temp_timer->progress <= 0)
22 {
23 temp_timer->ready = 1;
24 temp_timer->progress = temp_timer->delay;
25 }
26 temp_thread = temp_thread->next;
27 }
28 }
29 */