mutex_init: remove force inline
This commit is contained in:
parent
fb49965e95
commit
4287759c46
2 changed files with 8 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue