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
71 #if defined(__WIN32__) && !defined(HAVE_LIBC) 92 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD 95 typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)
96 (
void *, unsigned, unsigned (__stdcall *func)(
void *),
97 void * ,
unsigned,
unsigned * );
98 typedef void (__cdecl * pfnSDL_CurrentEndThread) (
unsigned code);
103 extern DECLSPEC SDL_Thread *SDLCALL
105 pfnSDL_CurrentBeginThread pfnBeginThread,
106 pfnSDL_CurrentEndThread pfnEndThread);
111 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API 112 #undef SDL_CreateThread 113 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) 115 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) 118 #elif defined(__OS2__) 123 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD 129 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(
void *),
void *,
unsigned,
void * );
130 typedef void (*pfnSDL_CurrentEndThread)(void);
131 extern DECLSPEC SDL_Thread *SDLCALL
133 pfnSDL_CurrentBeginThread pfnBeginThread,
134 pfnSDL_CurrentEndThread pfnEndThread);
135 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API 136 #undef SDL_CreateThread 137 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) 139 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) 162 extern DECLSPEC SDL_Thread *SDLCALL
179 extern DECLSPEC SDL_threadID SDLCALL
SDL_ThreadID(
void);
186 extern DECLSPEC SDL_threadID SDLCALL
SDL_GetThreadID(SDL_Thread * thread);
211 extern DECLSPEC
void SDLCALL
SDL_WaitThread(SDL_Thread * thread,
int *status);
283 extern DECLSPEC
void * SDLCALL
SDL_TLSGet(SDL_TLSID
id);
297 extern DECLSPEC
int SDLCALL
SDL_TLSSet(SDL_TLSID
id,
const void *value,
void (SDLCALL *destructor)(
void*));
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
DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void(SDLCALL *destructor)(void *))
Set the value associated with a thread local storage ID for the current thread.
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 void SDLCALL SDL_DetachThread(SDL_Thread *thread)
DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void)
DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread *thread)
int(SDLCALL * SDL_ThreadFunction)(void *data)
Definition: SDL_thread.h:69