|
SDL
2.0
|
#include "../../SDL_internal.h"#include "SDL_timer.h"#include "SDL_thread.h"#include "SDL_systhread_c.h"
Include dependency graph for SDL_syssem.c:Go to the source code of this file.
Data Structures | |
| struct | SDL_sem |
Functions | |
| SDL_sem * | SDL_CreateSemaphore (Uint32 initial_value) |
| void | SDL_DestroySemaphore (SDL_sem *sem) |
| int | SDL_SemTryWait (SDL_sem *sem) |
| int | SDL_SemWaitTimeout (SDL_sem *sem, Uint32 timeout) |
| int | SDL_SemWait (SDL_sem *sem) |
| Uint32 | SDL_SemValue (SDL_sem *sem) |
| int | SDL_SemPost (SDL_sem *sem) |
| SDL_sem* SDL_CreateSemaphore | ( | Uint32 | initial_value | ) |
Create a semaphore, initialized with value, returns NULL on failure.
Definition at line 85 of file SDL_syssem.c.
| void SDL_DestroySemaphore | ( | SDL_sem * | sem | ) |
Destroy a semaphore.
Definition at line 111 of file SDL_syssem.c.
Referenced by SDL_CreateSemaphore().
| int SDL_SemPost | ( | SDL_sem * | sem | ) |
Atomically increases the semaphore's count (not blocking).
Definition at line 200 of file SDL_syssem.c.
| int SDL_SemTryWait | ( | SDL_sem * | sem | ) |
Non-blocking variant of SDL_SemWait().
Definition at line 130 of file SDL_syssem.c.
Referenced by SDL_SemWaitTimeout().
| Uint32 SDL_SemValue | ( | SDL_sem * | sem | ) |
| int SDL_SemWait | ( | SDL_sem * | sem | ) |
This function suspends the calling thread until the semaphore pointed to by sem has a positive count. It then atomically decreases the semaphore count.
Definition at line 180 of file SDL_syssem.c.
Referenced by SDL_SemWaitTimeout().
Variant of SDL_SemWait() with a timeout in milliseconds.
Definition at line 150 of file SDL_syssem.c.
Referenced by SDL_SemWait().