#include "types.h"
#include "task.h"
Go to the source code of this file.
Data Structures | |
struct | OtosMutex |
Defines | |
#define | MUTEX_SUCCESS 0 |
#define | MUTEX_ALREADY_LOCKED 1 |
#define | MUTEX_TIMEOUT 2 |
#define | MUTEX_NOT_OWNER 3 |
Functions | |
uint8_t | otosLockMutex (OtosMutex *pMutex, uint32_t timeout) |
Lock a mutex. | |
uint8_t | otosUnlockMutex (OtosMutex *pMutex) |
Unlock a mutex. |
Definition in file mutex.h.
|
Lock a mutex. If the mutex is already locked, the task gets blocked. It is woken up again when the mutex is unlocked by another task.
Definition at line 104 of file mutex.c. References g_pRunningTask, otosBlock, and otosTestAndSet(). |
|
Unlock a mutex. If a task waits for this mutex, it is woken up.
Definition at line 161 of file mutex.c. References g_pBlockedQueue, g_performDispatch, g_pRunningTask, otosScheduler(), and otosWakeup(). |