Declaration of the Mutex structure and supporting functions for working with mutexes. More...
#include <stdbool.h>

Go to the source code of this file.
Classes | |
| struct | Mutex |
| Represents a handle to a mutex. Call mutex_create() to create the mutex and mutex_destroy() to destroy the mutex (when done with it). More... | |
Macros | |
| #define | __MUTEX_H__ |
Functions | |
| bool | mutex_create (Mutex *mutex) |
| Create a new mutex, which is initially not owned. | |
| bool | mutex_destroy (Mutex *mutex) |
| Destroy a previously created mutex. | |
| bool | mutex_lock (Mutex *mutex) |
| Lock a previously created and unlocked mutex. This will block if the mutex is already locked by some other thread. | |
| bool | mutex_unlock (Mutex *mutex) |
| Unlock a previously locked mutex. | |
Declaration of the Mutex structure and supporting functions for working with mutexes.
Definition in file mutex.h.
| bool mutex_create | ( | Mutex * | mutex | ) |
Create a new mutex, which is initially not owned.
| mutex | A Mutex object in which the mutex is created. |
Definition at line 71 of file mutex.c.
References _allocate_mutex_handle(), and Mutex::handle.
Referenced by _CreateMutex().
| bool mutex_destroy | ( | Mutex * | mutex | ) |
Destroy a previously created mutex.
| mutex | A Mutex object to destroy. |
Definition at line 128 of file mutex.c.
References _deallocate_mutex_handle(), _get_mutex_handle(), and Mutex::handle.
Referenced by _DestroyMutex().
| bool mutex_lock | ( | Mutex * | mutex | ) |
Lock a previously created and unlocked mutex. This will block if the mutex is already locked by some other thread.
| mutex | A Mutex object to lock. |
Definition at line 160 of file mutex.c.
References _get_mutex_handle(), and Mutex::handle.
Referenced by _LockMutex().
| bool mutex_unlock | ( | Mutex * | mutex | ) |
Unlock a previously locked mutex.
| mutex | A Mutex object to unlock. |
Definition at line 197 of file mutex.c.
References _get_mutex_handle(), and Mutex::handle.
Referenced by _UnlockMutex().