1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

xtimer/xtimer.c:_mutex_timeout() improved

no longer into the "if" when the mutex is free
This commit is contained in:
JulianHolzwarth 2019-05-31 17:43:18 +02:00
parent f3b13cf90c
commit 7cd3e8b73e

View File

@ -250,7 +250,8 @@ static void _mutex_timeout(void *arg)
mutex_thread_t *mt = (mutex_thread_t *)arg;
if (mt->mutex->queue.next != MUTEX_LOCKED) {
if (mt->mutex->queue.next != MUTEX_LOCKED &&
mt->mutex->queue.next != NULL) {
mt->timeout = 1;
list_node_t *node = list_remove(&mt->mutex->queue,
(list_node_t *)&mt->thread->rq_entry);
@ -266,7 +267,6 @@ static void _mutex_timeout(void *arg)
return;
}
}
irq_restore(irqstate);
}