Commits (1)
  • Deucе's avatar
    Use MinGW32 types for pthread_t and pthread_mutex_t · 3d0d525c
    Deucе authored
    uintptr_t should be the same as a DWORD on Win32,
    and CRITICAL_SECTION can be stored in an inptr_t as well.
    This should work fine, and allow more build environments to be happy.
    This is generally caused by new C++ standards having thread support
    in the standard library, so wrappers getting pushed deeper in.
    At some pointer, this should be redone with standard threads, but
    now is not the time.
......@@ -64,7 +64,7 @@ extern "C" {
#include <errno.h> /* EAGAIN and EBUSY */
/* POSIX threads */
typedef DWORD pthread_t;
typedef uintptr_t pthread_t;
#define pthread_self() GetCurrentThreadId()
#define pthread_equal(t1,t2) ((t1)==(t2))
......@@ -75,7 +75,7 @@ extern "C" {
#else /* Implemented as Win32 Critical Sections */
typedef CRITICAL_SECTION pthread_mutex_t;
typedef intptr_t pthread_mutex_t;