+ #define USE_POSIX_THREADS 1
+#endif
+
+///////////////
+
+
+#if USE_CPP11_THREADS
+ #include <thread>
+#endif
+
+#include "threading/mutex.h"
+
+//
+// threadid_t, threadhandle_t
+//
+#if USE_CPP11_THREADS
+ typedef std::thread::id threadid_t;
+ typedef std::thread::native_handle_type threadhandle_t;
+#elif USE_WIN_THREADS
+ typedef DWORD threadid_t;
+ typedef HANDLE threadhandle_t;
+#elif USE_POSIX_THREADS
+ typedef pthread_t threadid_t;
+ typedef pthread_t threadhandle_t;
+#endif
+
+//
+// ThreadStartFunc
+//
+#if USE_CPP11_THREADS || USE_POSIX_THREADS
+ typedef void *ThreadStartFunc(void *param);
+#elif defined(_WIN32_WCE)
+ typedef DWORD ThreadStartFunc(LPVOID param);
+#elif defined(_WIN32)
+ typedef DWORD WINAPI ThreadStartFunc(LPVOID param);