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 | |
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')
-rw-r--r-- | include/my_pthread.h | 27 | ||||
-rw-r--r-- | include/violite.h | 9 |
2 files changed, 3 insertions, 33 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 { diff --git a/include/violite.h b/include/violite.h index a7165ca91a9..8be9859ceb4 100644 --- a/include/violite.h +++ b/include/violite.h @@ -211,14 +211,6 @@ void vio_end(void); #define SHUT_RD SD_RECEIVE #endif -/* - Set thread id for io cancellation (required on Windows XP only, - and should to be removed if XP is no more supported) -*/ - -#define vio_set_thread_id(vio, tid) if(vio) vio->thread_id= tid -#else -#define vio_set_thread_id(vio, tid) #endif /* This enumerator is used in parser - should be always visible */ @@ -288,7 +280,6 @@ struct st_vio #ifdef _WIN32 HANDLE hPipe; OVERLAPPED overlapped; - DWORD thread_id; /* Used on XP only by vio_shutdown() */ DWORD read_timeout_ms; DWORD write_timeout_ms; #endif |