diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-06-01 13:29:40 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-06-01 20:29:10 +0200 |
commit | 3a7bc23a1637696005003163b67328b97c7a1aaa (patch) | |
tree | c56ff4f5d66248f5bad1d45c8a01cde52b812826 /include/my_pthread.h | |
parent | 22ede741f0a4edfcbbae78fd5a23c24056fc7dcb (diff) | |
download | mariadb-git-3a7bc23a1637696005003163b67328b97c7a1aaa.tar.gz |
MDEV-9154 : Remove workarounds (mainly dynamic function loading)
for running obsolete versions of Windows
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 991bc76c1ec..de1f0af070a 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -54,26 +54,7 @@ typedef struct st_pthread_link { We use native conditions on Vista and later, and fallback to own implementation on earlier OS version. */ -typedef union -{ - /* Native condition (used on Vista and later) */ - CONDITION_VARIABLE native_cond; - - /* Own implementation (used on XP) */ - struct - { - uint32 waiting; - CRITICAL_SECTION lock_waiting; - enum - { - SIGNAL= 0, - BROADCAST= 1, - MAX_EVENTS= 2 - } EVENTS; - HANDLE events[MAX_EVENTS]; - HANDLE broadcast_block_event; - }; -} pthread_cond_t; +typedef CONDITION_VARIABLE pthread_cond_t; typedef int pthread_mutexattr_t; @@ -81,10 +62,8 @@ typedef int pthread_mutexattr_t; #define pthread_handler_t EXTERNC void * __cdecl typedef void * (__cdecl *pthread_handler)(void *); -typedef volatile LONG my_pthread_once_t; -#define MY_PTHREAD_ONCE_INIT 0 -#define MY_PTHREAD_ONCE_INPROGRESS 1 -#define MY_PTHREAD_ONCE_DONE 2 +typedef INIT_ONCE my_pthread_once_t; +#define MY_PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT; #if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC struct timespec { |