|
Size: 1449
Comment: minor change
|
Size: 1414
Comment: update content - pointers, structs
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 18: | Line 18: |
| ||'''sem'''||^a pointer to the SDL_sem structure / semaphore to be incremented^|| | ||'''sem'''||^the SDL_sem to be incremented^|| |
DRAFT |
SDL_SemPost
Use this function to *unlock a semaphore and* atomically increase the semaphore's count (not blocking).
green
Contents
Syntax
int SDL_SemPost(SDL_sem* sem)
Function Parameters
sem |
the SDL_sem to be incremented |
Return Value
Returns 0 on success (and increments the semaphore count) or a negative error code on failure *(leaving the semaphore unchanged)*; call SDL_GetError() for more information.
Code Examples
*
SDL_SemPost(my_sem);
*
Remarks
*
SDL_SemPost() unlocks the semaphore pointed to by sem and atomically increments the semaphore's value. Threads that were blocking on the semaphore may be scheduled after this call succeeds.
SDL_SemPost() should be called after a semaphore is locked by a successful call to SDL_SemWait(), SDL_SemTryWait() or SDL_SemWaitTimeout().
*
green
