# | Line 532 | Line 532 | static void *timer_func(void *arg) | |
---|---|---|
532 | ||
533 | tm_time_t system_time; | |
534 | timer_current_time(system_time); | |
535 | – | pthread_mutex_lock(&wakeup_time_lock); |
535 | if (timer_cmp_time(wakeup_time, system_time) < 0) { | |
536 | ||
537 | // Timer expired, trigger interrupt | |
538 | + | pthread_mutex_lock(&wakeup_time_lock); |
539 | wakeup_time = wakeup_time_max; | |
540 | + | pthread_mutex_unlock(&wakeup_time_lock); |
541 | SetInterruptFlag(INTFLAG_TIMER); | |
542 | TriggerInterrupt(); | |
543 | } | |
543 | – | pthread_mutex_unlock(&wakeup_time_lock); |
544 | } | |
545 | return NULL; | |
546 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |