1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

Merge pull request #1446 from Kijewski/vtimer-spurious-hwtimer-call

vtimer: fix crash on spurious hwtimer callback
This commit is contained in:
Christian Mehlis 2014-07-18 21:15:16 +02:00
commit eac161c7d1

View File

@ -177,13 +177,18 @@ void vtimer_callback(void *ptr)
/* get the vtimer that fired */
vtimer_t *timer = (vtimer_t *)queue_remove_head(&shortterm_queue_root);
if (timer) {
#if ENABLE_DEBUG
vtimer_print(timer);
vtimer_print(timer);
#endif
DEBUG("vtimer_callback(): Shooting %" PRIu32 ".\n", timer->absolute.microseconds);
DEBUG("vtimer_callback(): Shooting %" PRIu32 ".\n", timer->absolute.microseconds);
/* shoot timer */
timer->action(timer);
/* shoot timer */
timer->action(timer);
}
else {
DEBUG("vtimer_callback(): spurious call.\n");
}
in_callback = false;
update_shortterm();