From df66dd02720c78e6afe5d8aab08d0a3369de3a81 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 24 Nov 2020 11:19:34 +0100 Subject: [PATCH] core/mutex: uncrustify --- core/include/mutex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/include/mutex.h b/core/include/mutex.h index 4dc635474a..db2dd7fd72 100644 --- a/core/include/mutex.h +++ b/core/include/mutex.h @@ -183,6 +183,7 @@ static inline void mutex_init(mutex_t *mutex) static inline mutex_cancel_t mutex_cancel_init(mutex_t *mutex) { mutex_cancel_t result = { mutex, thread_get_active(), 0 }; + return result; } @@ -202,10 +203,11 @@ static inline int mutex_trylock(mutex_t *mutex) { unsigned irq_state = irq_disable(); int retval = 0; + if (mutex->queue.next == NULL) { mutex->queue.next = MUTEX_LOCKED; retval = 1; - }; + } irq_restore(irq_state); return retval; }