mirror of
https://github.com/bitsycore/XCEP.h.git
synced 2026-10-05 12:37:27 +00:00
20 lines
558 B
C
20 lines
558 B
C
#ifndef XCEPPROJECT_CROSS_THREAD_H
|
|
#define XCEPPROJECT_CROSS_THREAD_H
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <Windows.h>
|
|
typedef HANDLE XCEPTEST_t_Thread;
|
|
typedef DWORD (WINAPI *XCEPTEST_t_ThreadProc)(LPVOID);
|
|
#else // POSIX Thread
|
|
#include <pthread.h>
|
|
typedef pthread_t XCEPTEST_t_Thread;
|
|
typedef void* (*XCEPTEST_t_ThreadProc)(void*);
|
|
#endif
|
|
|
|
int XCEPTEST_ThreadCreate(XCEPTEST_t_Thread *thread, XCEPTEST_t_ThreadProc func, void *arg);
|
|
void XCEPTEST_ThreadJoin(XCEPTEST_t_Thread thread);
|
|
void XCEPTEST_Sleep(int milliseconds);
|
|
|
|
#endif //XCEPPROJECT_CROSS_THREAD_H
|