|
SDL
2.0
|
#include "../SDL_internal.h"#include "SDL_timer.h"#include "SDL_timer_c.h"#include "SDL_atomic.h"#include "SDL_cpuinfo.h"#include "../thread/SDL_systhread.h"
Include dependency graph for SDL_timer.c:Go to the source code of this file.
Data Structures | |
| struct | _SDL_Timer |
| struct | _SDL_TimerMap |
| struct | SDL_TimerData |
Functions | |
| static void | SDL_AddTimerInternal (SDL_TimerData *data, SDL_Timer *timer) |
| static int | SDL_TimerThread (void *_data) |
| int | SDL_TimerInit (void) |
| void | SDL_TimerQuit (void) |
| SDL_TimerID | SDL_AddTimer (Uint32 interval, SDL_TimerCallback callback, void *param) |
| Add a new timer to the pool of timers already running. More... | |
| SDL_bool | SDL_RemoveTimer (SDL_TimerID id) |
| Remove a timer knowing its ID. More... | |
Variables | |
| static SDL_TimerData | SDL_timer_data |
| SDL_TimerID SDL_AddTimer | ( | Uint32 | interval, |
| SDL_TimerCallback | callback, | ||
| void * | param | ||
| ) |
Add a new timer to the pool of timers already running.
Definition at line 279 of file SDL_timer.c.
References callback(), SDL_AtomicGet, SDL_AtomicIncRef, SDL_AtomicLock, SDL_AtomicSet, SDL_AtomicUnlock, SDL_free, SDL_GetTicks(), SDL_LockMutex, SDL_malloc, SDL_OutOfMemory, SDL_RemoveTimer(), SDL_SemPost, SDL_timer_data, SDL_TimerInit(), and SDL_UnlockMutex.
|
static |
| SDL_bool SDL_RemoveTimer | ( | SDL_TimerID | id | ) |
Remove a timer knowing its ID.
Definition at line 342 of file SDL_timer.c.
References NULL, SDL_AtomicGet, SDL_AtomicSet, SDL_FALSE, SDL_free, SDL_LockMutex, SDL_timer_data, SDL_TRUE, and SDL_UnlockMutex.
Referenced by SDL_AddTimer().
| int SDL_TimerInit | ( | void | ) |
Definition at line 207 of file SDL_timer.c.
References SDL_AtomicGet, SDL_AtomicSet, SDL_CreateMutex, SDL_CreateSemaphore, SDL_CreateThreadInternal(), SDL_DestroyMutex, SDL_timer_data, SDL_TimerQuit(), SDL_TimerThread(), and SDL_TimerData::timermap_lock.
Referenced by SDL_AddTimer(), and SDL_InitSubSystem().
Definition at line 239 of file SDL_timer.c.
References NULL, SDL_AtomicCAS, SDL_DestroyMutex, SDL_DestroySemaphore, SDL_free, SDL_SemPost, SDL_timer_data, and SDL_WaitThread.
Referenced by SDL_QuitSubSystem(), and SDL_TimerInit().
|
static |
Definition at line 101 of file SDL_timer.c.
References NULL, SDL_AddTimerInternal(), SDL_AtomicGet, SDL_AtomicLock, SDL_AtomicSet, SDL_AtomicUnlock, SDL_GetTicks(), SDL_MUTEX_MAXWAIT, and SDL_SemWaitTimeout.
Referenced by SDL_TimerInit().
|
static |
Definition at line 71 of file SDL_timer.c.
Referenced by SDL_AddTimer(), SDL_RemoveTimer(), SDL_TimerInit(), and SDL_TimerQuit().