Thread subsystem IV.
More...
|
#define | LWP_SEM_NULL 0xffffffff |
|
|
typedef u32 | sem_t |
| typedef for the semaphore handle
|
|
◆ LWP_SemDestroy()
Close and destroy a semaphore, release all threads and handles locked on this semaphore.
- Parameters
-
[in] | sem | handle to the sem_t structure. |
- Returns
- 0 on success, <0 on error
◆ LWP_SemGetValue()
return the current semaphore count
- Parameters
-
[in] | sem | handle to the sem_t structure. |
[out] | the | current value of the semaphore |
- Returns
- 0 on success, <0 on error
◆ LWP_SemInit()
Initializes a semaphore.
- Parameters
-
[out] | sem | pointer to a sem_t handle. |
[in] | start | start count of the semaphore |
[in] | max | maximum count of the semaphore |
- Returns
- 0 on success, <0 on error
◆ LWP_SemPost()
Count up semaphore counter and release lock if counter >0.
- Parameters
-
[in] | sem | handle to the sem_t structure. |
- Returns
- 0 on success, <0 on error
◆ LWP_SemWait()
Count down semaphore counter and enter lock if counter <=0.
- Parameters
-
[in] | sem | handle to the sem_t structure. |
- Returns
- 0 on success, <0 on error