28 #define THREAD_STACK_SIZE (1*1024*1024)
40 ThreadInfo *inf = (ThreadInfo*)ptr;
43 ret = inf->func(inf->ptr);
44 ExitThread((
DWORD)ret);
52 ThreadInfo *inf =
malloc(
sizeof(ThreadInfo));
73 WaitForSingleObject(inf->thread, INFINITE);
74 GetExitCodeThread(inf->thread, &ret);
75 CloseHandle(inf->thread);
95 ThreadInfo *inf = (ThreadInfo*)ptr;
96 inf->ret = inf->func(inf->ptr);
103 ThreadInfo *inf =
malloc(
sizeof(ThreadInfo));
104 if(!inf)
return NULL;
106 if(pthread_attr_init(&attr) != 0)
113 pthread_attr_destroy(&attr);
120 if(pthread_create(&inf->thread, &attr,
StarterFunc, inf) != 0)
122 pthread_attr_destroy(&attr);
126 pthread_attr_destroy(&attr);
136 pthread_join(inf->thread,
NULL);
static void * StarterFunc(void *ptr)
#define THREAD_STACK_SIZE
typedef HANDLE(WINAPI *PFNWGLCREATEBUFFERREGIONARBPROC)(HDC hDC
ALuint StopThread(ALvoid *thread)
static SDL_Thread * thread
typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex
ALvoid * StartThread(ALuint(*func)(ALvoid *), ALvoid *ptr)