aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstrongswan/threading/windows/mutex.c5
-rw-r--r--src/libstrongswan/threading/windows/rwlock.c5
-rw-r--r--src/libstrongswan/threading/windows/thread.c5
-rw-r--r--src/libstrongswan/threading/windows/thread.h25
-rw-r--r--src/libstrongswan/threading/windows/thread_value.c5
5 files changed, 12 insertions, 33 deletions
diff --git a/src/libstrongswan/threading/windows/mutex.c b/src/libstrongswan/threading/windows/mutex.c
index 873cb8f98..a26889580 100644
--- a/src/libstrongswan/threading/windows/mutex.c
+++ b/src/libstrongswan/threading/windows/mutex.c
@@ -13,13 +13,12 @@
* for more details.
*/
-#include <library.h>
+#include "thread.h"
+
#include <utils/debug.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
-#include "thread.h"
-
typedef struct private_mutex_t private_mutex_t;
typedef struct private_condvar_t private_condvar_t;
diff --git a/src/libstrongswan/threading/windows/rwlock.c b/src/libstrongswan/threading/windows/rwlock.c
index b27ef0035..0de57f713 100644
--- a/src/libstrongswan/threading/windows/rwlock.c
+++ b/src/libstrongswan/threading/windows/rwlock.c
@@ -13,14 +13,13 @@
* for more details.
*/
-#include <library.h>
+#include "thread.h"
+
#include <utils/debug.h>
#include <threading/rwlock.h>
#include <threading/rwlock_condvar.h>
#include <threading/thread_value.h>
-#include "thread.h"
-
typedef struct private_rwlock_t private_rwlock_t;
typedef struct private_rwlock_condvar_t private_rwlock_condvar_t;
diff --git a/src/libstrongswan/threading/windows/thread.c b/src/libstrongswan/threading/windows/thread.c
index 35d56c47d..2ea0f9a7e 100644
--- a/src/libstrongswan/threading/windows/thread.c
+++ b/src/libstrongswan/threading/windows/thread.c
@@ -13,15 +13,14 @@
* for more details.
*/
-#include <library.h>
+#include "thread.h"
+
#include <utils/debug.h>
#include <threading/spinlock.h>
#include <threading/thread.h>
#include <collections/hashtable.h>
#include <collections/array.h>
-#include "thread.h"
-
typedef struct private_thread_t private_thread_t;
diff --git a/src/libstrongswan/threading/windows/thread.h b/src/libstrongswan/threading/windows/thread.h
index 571171702..3c470522b 100644
--- a/src/libstrongswan/threading/windows/thread.h
+++ b/src/libstrongswan/threading/windows/thread.h
@@ -16,6 +16,10 @@
#ifndef WINDOWS_THREAD_H_
#define WINDOWS_THREAD_H_
+/* for conditionVariables, Vista */
+#define _WIN32_WINNT 0x0600
+#include <library.h>
+
/**
* @defgroup windowsthread windows
* @ingroup threading
@@ -25,27 +29,6 @@
*/
/**
- * MinGW seems to miss the actual struct definition
- */
-typedef struct {
- PVOID Ptr;
-} SRWLOCK, *PSRWLOCK, CONDITION_VARIABLE, *PCONDITION_VARIABLE;
-
-VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
-BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable,
- PCRITICAL_SECTION CriticalSection, DWORD dwMilliseconds);
-BOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable,
- PSRWLOCK SRWLock, DWORD dwMilliseconds, ULONG Flags);
-VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable);
-VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
-VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK SRWLock);
-VOID WINAPI AcquireSRWLockShared(PSRWLOCK SRWLock);
-BOOL TryAcquireSRWLockExclusive(PSRWLOCK SRWLock);
-VOID WINAPI InitializeSRWLock(PSRWLOCK SRWLock);
-VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK SRWLock);
-VOID WINAPI ReleaseSRWLockShared(PSRWLOCK SRWLock);
-
-/**
* Set active condvar of a thread before waiting in it.
*
* @param cv active condition variable, NULL to unset
diff --git a/src/libstrongswan/threading/windows/thread_value.c b/src/libstrongswan/threading/windows/thread_value.c
index da79d7b44..1dd8a7816 100644
--- a/src/libstrongswan/threading/windows/thread_value.c
+++ b/src/libstrongswan/threading/windows/thread_value.c
@@ -13,11 +13,10 @@
* for more details.
*/
-#include <library.h>
-#include <threading/thread_value.h>
-
#include "thread.h"
+#include <threading/thread_value.h>
+
typedef struct private_thread_value_t private_thread_value_t;