Thread subsystem III.
More...
|
#define | LWP_MUTEX_NULL 0xffffffff |
|
◆ LWP_MutexDestroy()
Close mutex lock, release all threads and handles locked on this mutex.
- Parameters
-
[in] | mutex | handle to the mutex_t structure. |
- Returns
- 0 on success, <0 on error
◆ LWP_MutexInit()
s32 LWP_MutexInit |
( |
mutex_t * |
mutex, |
|
|
bool |
use_recursive |
|
) |
| |
Initializes a mutex lock.
- Parameters
-
[out] | mutex | pointer to a mutex_t handle. |
[in] | use_recursive | whether to allow the thread, whithin the same context, to enter multiple times the lock or not. |
- Returns
- 0 on success, <0 on error
◆ LWP_MutexLock()
Enter the mutex lock.
- Parameters
-
[in] | mutex | handle to the mutext_t structure. |
- Returns
- 0 on success, <0 on error
◆ LWP_MutexTryLock()
Try to enter the mutex lock.
- Parameters
-
[in] | mutex | handle to the mutex_t structure. |
- Returns
- 0: on first aquire, 1: would lock
◆ LWP_MutexUnlock()
Release the mutex lock and let other threads process further on this mutex.
- Parameters
-
[in] | mutex | handle to the mutex_t structure. |
- Returns
- 0 on success, <0 on error