windows: Include for Vista instead of defining CondVar/SRWLock functions ourself
This commit is contained in:
@@ -13,13 +13,12 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <library.h>
|
#include "thread.h"
|
||||||
|
|
||||||
#include <utils/debug.h>
|
#include <utils/debug.h>
|
||||||
#include <threading/mutex.h>
|
#include <threading/mutex.h>
|
||||||
#include <threading/condvar.h>
|
#include <threading/condvar.h>
|
||||||
|
|
||||||
#include "thread.h"
|
|
||||||
|
|
||||||
typedef struct private_mutex_t private_mutex_t;
|
typedef struct private_mutex_t private_mutex_t;
|
||||||
typedef struct private_condvar_t private_condvar_t;
|
typedef struct private_condvar_t private_condvar_t;
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,13 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <library.h>
|
#include "thread.h"
|
||||||
|
|
||||||
#include <utils/debug.h>
|
#include <utils/debug.h>
|
||||||
#include <threading/rwlock.h>
|
#include <threading/rwlock.h>
|
||||||
#include <threading/rwlock_condvar.h>
|
#include <threading/rwlock_condvar.h>
|
||||||
#include <threading/thread_value.h>
|
#include <threading/thread_value.h>
|
||||||
|
|
||||||
#include "thread.h"
|
|
||||||
|
|
||||||
typedef struct private_rwlock_t private_rwlock_t;
|
typedef struct private_rwlock_t private_rwlock_t;
|
||||||
typedef struct private_rwlock_condvar_t private_rwlock_condvar_t;
|
typedef struct private_rwlock_condvar_t private_rwlock_condvar_t;
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <library.h>
|
#include "thread.h"
|
||||||
|
|
||||||
#include <utils/debug.h>
|
#include <utils/debug.h>
|
||||||
#include <threading/spinlock.h>
|
#include <threading/spinlock.h>
|
||||||
#include <threading/thread.h>
|
#include <threading/thread.h>
|
||||||
#include <collections/hashtable.h>
|
#include <collections/hashtable.h>
|
||||||
#include <collections/array.h>
|
#include <collections/array.h>
|
||||||
|
|
||||||
#include "thread.h"
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct private_thread_t private_thread_t;
|
typedef struct private_thread_t private_thread_t;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
#ifndef WINDOWS_THREAD_H_
|
#ifndef WINDOWS_THREAD_H_
|
||||||
#define WINDOWS_THREAD_H_
|
#define WINDOWS_THREAD_H_
|
||||||
|
|
||||||
|
/* for conditionVariables, Vista */
|
||||||
|
#define _WIN32_WINNT 0x0600
|
||||||
|
#include <library.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup windowsthread windows
|
* @defgroup windowsthread windows
|
||||||
* @ingroup threading
|
* @ingroup threading
|
||||||
@@ -24,27 +28,6 @@
|
|||||||
* @{ @ingroup windowsthread
|
* @{ @ingroup windowsthread
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
* Set active condvar of a thread before waiting in it.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -13,11 +13,10 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <library.h>
|
|
||||||
#include <threading/thread_value.h>
|
|
||||||
|
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
||||||
|
#include <threading/thread_value.h>
|
||||||
|
|
||||||
|
|
||||||
typedef struct private_thread_value_t private_thread_value_t;
|
typedef struct private_thread_value_t private_thread_value_t;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user