#include "SDL_internal.h"
#ifndef SDL_thread_c_h_
#define SDL_thread_c_h_
#ifdef SDL_THREADS_DISABLED
#include "generic/SDL_systhread_c.h"
#elif defined(SDL_THREAD_PTHREAD)
#include "pthread/SDL_systhread_c.h"
#elif defined(SDL_THREAD_WINDOWS)
#include "windows/SDL_systhread_c.h"
#elif defined(SDL_THREAD_PS2)
#include "ps2/SDL_systhread_c.h"
#elif defined(SDL_THREAD_PSP)
#include "psp/SDL_systhread_c.h"
#elif defined(SDL_THREAD_VITA)
#include "vita/SDL_systhread_c.h"
#elif defined(SDL_THREAD_N3DS)
#include "n3ds/SDL_systhread_c.h"
#else
#error Need thread implementation for this platform
#include "generic/SDL_systhread_c.h"
#endif
#include "../SDL_error_c.h"
struct SDL_Thread
{
SDL_ThreadID threadid;
SYS_ThreadHandle handle;
int status;
SDL_AtomicInt state;
SDL_error errbuf;
char *name;
size_t stacksize; SDL_Semaphore *ready_sem; int(SDLCALL *userfunc)(void *);
void *userdata;
void *data;
SDL_FunctionPointer endfunc; };
extern void SDL_RunThread(SDL_Thread *thread);
typedef struct
{
int limit;
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4200)
#endif
struct
{
void *data;
void(SDLCALL *destructor)(void *);
} array[];
#ifdef _MSC_VER
#pragma warning(pop)
#endif
} SDL_TLSData;
#define TLS_ALLOC_CHUNKSIZE 4
extern void SDL_InitTLSData(void);
extern void SDL_QuitTLSData(void);
extern void SDL_Generic_InitTLSData(void);
extern SDL_TLSData *SDL_Generic_GetTLSData(void);
extern bool SDL_Generic_SetTLSData(SDL_TLSData *data);
extern void SDL_Generic_QuitTLSData(void);
#endif