Verified Commit 4287759c authored by Felix Kopp's avatar Felix Kopp
Browse files

mutex_init: remove force inline

parent fb49965e
......@@ -97,11 +97,7 @@ extern void _mutex_unlock(uint8_t *lock);
*
* @param mutex Mutex to initialize
*/
__always_inline void mutex_init(struct mutex *mutex)
{
mutex->lock = 0;
list_init(&mutex->wait_queue);
}
void mutex_init(struct mutex *mutex);
/**
* @brief Acquire an exclusive lock on a mutex.
......
......@@ -10,6 +10,13 @@
#include <errno.h>
#include <stddef.h>
void mutex_init(struct mutex *mutex)
{
mutex->lock = 0;
spin_init(&mutex->wait_queue_lock);
list_init(&mutex->wait_queue);
}
void mutex_lock(struct mutex *mutex)
{
if (mutex_trylock(mutex) != 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment