38#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__)
84#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__)
105#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
107typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
108 (
void *, unsigned, unsigned (__stdcall *func)(
void *),
109 void * ,
unsigned,
unsigned * );
110typedef void (__cdecl * pfnSDL_CurrentEndThread) (
unsigned code);
112#ifndef SDL_beginthread
113#define SDL_beginthread _beginthreadex
116#define SDL_endthread _endthreadex
135 pfnSDL_CurrentBeginThread pfnBeginThread,
136 pfnSDL_CurrentEndThread pfnEndThread);
154 const char *name,
const size_t stacksize,
void *data,
155 pfnSDL_CurrentBeginThread pfnBeginThread,
156 pfnSDL_CurrentEndThread pfnEndThread);
159#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
160#undef SDL_CreateThread
161#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
162#undef SDL_CreateThreadWithStackSize
163#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
165#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
166#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
432extern DECLSPEC
int SDLCALL
SDL_TLSSet(
SDL_TLSID id,
const void *value,
void (SDLCALL *destructor)(
void*));
Functions to provide thread synchronization primitives.
This is a general header that includes C language support.
void * SDL_TLSGet(SDL_TLSID id)
void SDL_DetachThread(SDL_Thread *thread)
SDL_threadID SDL_GetThreadID(SDL_Thread *thread)
const char * SDL_GetThreadName(SDL_Thread *thread)
SDL_TLSID SDL_TLSCreate(void)
SDL_Thread * SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data)
void SDL_TLSCleanup(void)
struct SDL_Thread SDL_Thread
int SDL_SetThreadPriority(SDL_ThreadPriority priority)
void SDL_WaitThread(SDL_Thread *thread, int *status)
unsigned long SDL_threadID
int SDL_TLSSet(SDL_TLSID id, const void *value, void(*destructor)(void *))
@ SDL_THREAD_PRIORITY_TIME_CRITICAL
@ SDL_THREAD_PRIORITY_LOW
@ SDL_THREAD_PRIORITY_HIGH
@ SDL_THREAD_PRIORITY_NORMAL
int(* SDL_ThreadFunction)(void *data)
SDL_threadID SDL_ThreadID(void)
SDL_Thread * SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data)