SDL
2.0
|
#include "../SDL_internal.h"
#include "SDL_thread.h"
#include "generic/SDL_systhread_c.h"
#include "../SDL_error_c.h"
Go to the source code of this file.
Data Structures | |
struct | SDL_Thread |
struct | SDL_TLSData |
Macros | |
#define | TLS_ALLOC_CHUNKSIZE 4 |
Enumerations | |
enum | SDL_ThreadState { SDL_THREAD_STATE_ALIVE, SDL_THREAD_STATE_DETACHED, SDL_THREAD_STATE_ZOMBIE, SDL_THREAD_STATE_CLEANED } |
Functions | |
void | SDL_RunThread (void *data) |
SDL_TLSData * | SDL_Generic_GetTLSData (void) |
int | SDL_Generic_SetTLSData (SDL_TLSData *data) |
#define TLS_ALLOC_CHUNKSIZE 4 |
Definition at line 79 of file SDL_thread_c.h.
Referenced by SDL_TLSSet().
enum SDL_ThreadState |
Enumerator | |
---|---|
SDL_THREAD_STATE_ALIVE | |
SDL_THREAD_STATE_DETACHED | |
SDL_THREAD_STATE_ZOMBIE | |
SDL_THREAD_STATE_CLEANED |
Definition at line 45 of file SDL_thread_c.h.
SDL_TLSData* SDL_Generic_GetTLSData | ( | void | ) |
Definition at line 124 of file SDL_thread.c.
References mutex, SDL_TLSEntry::next, NULL, SDL_AtomicLock, SDL_AtomicUnlock, SDL_CreateMutex, SDL_LockMutex, SDL_MemoryBarrierAcquire, SDL_MemoryBarrierRelease, SDL_ThreadID, SDL_UnlockMutex, SDL_TLSEntry::storage, and SDL_TLSEntry::thread.
Referenced by SDL_SYS_GetTLSData().
int SDL_Generic_SetTLSData | ( | SDL_TLSData * | data | ) |
Definition at line 163 of file SDL_thread.c.
References SDL_TLSEntry::next, NULL, SDL_free, SDL_generic_TLS, SDL_LockMutex, SDL_malloc, SDL_OutOfMemory, SDL_ThreadID, SDL_UnlockMutex, SDL_TLSEntry::storage, and SDL_TLSEntry::thread.
Referenced by SDL_SYS_SetTLSData().
Definition at line 265 of file SDL_thread.c.
References thread_args::data, thread_args::func, thread_args::info, SDL_AtomicCAS, SDL_free, SDL_SemPost, SDL_SYS_SetupThread(), SDL_THREAD_STATE_ALIVE, SDL_THREAD_STATE_CLEANED, SDL_THREAD_STATE_DETACHED, SDL_THREAD_STATE_ZOMBIE, SDL_ThreadID, SDL_TLSCleanup(), SDLCALL, SDL_TLSEntry::thread, and thread_args::wait.
Referenced by RunThread().