zenilib
0.5.3.0
|
#include "SDL_config.h"
#include "SDL_timer.h"
#include "SDL_timer_c.h"
#include "SDL_atomic.h"
#include "SDL_cpuinfo.h"
#include "SDL_thread.h"
Go to the source code of this file.
Typedefs | |
typedef struct _SDL_Timer | SDL_Timer |
typedef struct _SDL_TimerMap | SDL_TimerMap |
Functions | |
SDL_TimerID | SDL_AddTimer (Uint32 interval, SDL_TimerCallback callback, void *param) |
Add a new timer to the pool of timers already running. More... | |
static void | SDL_AddTimerInternal (SDL_TimerData *data, SDL_Timer *timer) |
SDL_bool | SDL_RemoveTimer (SDL_TimerID id) |
Remove a timer knowing its ID. More... | |
int | SDL_TimerInit (void) |
void | SDL_TimerQuit (void) |
static int | SDL_TimerThread (void *_data) |
Variables | |
static SDL_TimerData | SDL_timer_data |
typedef struct _SDL_Timer SDL_Timer |
typedef struct _SDL_TimerMap SDL_TimerMap |
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 284 of file SDL_timer.c.
References SDL_AtomicIncRef, SDL_AtomicLock(), SDL_AtomicUnlock(), SDL_FALSE, SDL_free(), SDL_GetTicks(), SDL_LockMutex(), SDL_malloc(), SDL_OutOfMemory, SDL_RemoveTimer(), SDL_SemPost(), SDL_timer_data, SDL_TimerInit(), and SDL_UnlockMutex().
Referenced by SDLTest_SetTestTimeout().
SDL_bool SDL_RemoveTimer | ( | SDL_TimerID | id | ) |
Remove a timer knowing its ID.
Definition at line 354 of file SDL_timer.c.
References NULL, SDL_FALSE, SDL_free(), SDL_LockMutex(), SDL_timer_data, SDL_TRUE, and SDL_UnlockMutex().
Referenced by SDL_AddTimer(), and SDLTest_RunTest().
Definition at line 206 of file SDL_timer.c.
References NULL, SDL_AtomicSet(), SDL_CreateMutex(), SDL_CreateSemaphore(), SDL_CreateThread(), SDL_DestroyMutex(), SDL_timer_data, SDL_TimerQuit(), SDL_TimerThread(), and SDL_TRUE.
Referenced by SDL_AddTimer(), and SDL_InitSubSystem().
Definition at line 242 of file SDL_timer.c.
References NULL, SDL_DestroyMutex(), SDL_DestroySemaphore(), SDL_FALSE, SDL_free(), SDL_SemPost(), SDL_timer_data, and SDL_WaitThread().
Referenced by SDL_QuitSubSystem(), and SDL_TimerInit().
Definition at line 101 of file SDL_timer.c.
References NULL, SDL_AddTimerInternal(), SDL_AtomicLock(), SDL_AtomicUnlock(), SDL_GetTicks(), SDL_MUTEX_MAXWAIT, SDL_SemWaitTimeout(), and SDL_TRUE.
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().