46 typedef struct SDL_Thread SDL_Thread;
49 typedef unsigned long SDL_threadID;
52 typedef unsigned int SDL_TLSID;
60 SDL_THREAD_PRIORITY_LOW,
61 SDL_THREAD_PRIORITY_NORMAL,
62 SDL_THREAD_PRIORITY_HIGH
69 typedef int (SDLCALL * SDL_ThreadFunction) (
void *data);
71 #if defined(__WIN32__) && !defined(HAVE_LIBC)
92 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
95 typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (
void *, unsigned,
101 typedef void (__cdecl * pfnSDL_CurrentEndThread) (
unsigned code);
106 extern DECLSPEC SDL_Thread *SDLCALL
108 pfnSDL_CurrentBeginThread pfnBeginThread,
109 pfnSDL_CurrentEndThread pfnEndThread);
114 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
136 extern DECLSPEC SDL_Thread *SDLCALL
153 extern DECLSPEC SDL_threadID SDLCALL
SDL_ThreadID(
void);
160 extern DECLSPEC SDL_threadID SDLCALL
SDL_GetThreadID(SDL_Thread * thread);
173 extern DECLSPEC
void SDLCALL
SDL_WaitThread(SDL_Thread * thread,
int *status);
217 extern DECLSPEC
void * SDLCALL
SDL_TLSGet(SDL_TLSID
id);
231 extern DECLSPEC
int SDLCALL
SDL_TLSSet(SDL_TLSID
id,
const void *value,
void (*destructor)(
void*));
typedef int(SDLCALL *SDL_EventFilter)(void *userdata
DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status)
DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority)
DECLSPEC void *SDLCALL SDL_TLSGet(SDL_TLSID id)
Get the value associated with a thread local storage ID for the current thread.
DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread)
SDL_ThreadPriority
Definition: SDL_thread.h:59
typedef void(SDLCALL *SDL_AudioCallback)(void *userdata
DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data)
DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void)
Create an identifier that is globally visible to all threads but refers to data that is thread-specif...
DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void)
DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread *thread)
DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void(*destructor)(void *))
Set the value associated with a thread local storage ID for the current thread.