winpr: fix definitions of synchronization barrier and interlocked functions
This commit is contained in:
parent
0d1553942e
commit
d4c809c4ae
@ -158,7 +158,7 @@ WINPR_API PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination, P
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#if (!defined(_WIN32) || (defined(_WIN32) && !defined(_M_AMD64) && (_WIN32_WINNT < 0x0502)))
|
||||
#if (!defined(_WIN32) || (defined(_WIN32) && (_WIN32_WINNT < 0x0502) && !defined(InterlockedCompareExchange64)))
|
||||
#define WINPR_INTERLOCKED_COMPARE_EXCHANGE64 1
|
||||
#endif
|
||||
|
||||
|
@ -329,7 +329,11 @@ WINPR_API VOID InitOnceInitialize(PINIT_ONCE InitOnce);
|
||||
|
||||
/* Synchronization Barrier */
|
||||
|
||||
#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0602))
|
||||
#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0602) && !defined(_SYNCHAPI_H_))
|
||||
#define WINPR_SYNCHRONIZATION_BARRIER 1
|
||||
#endif
|
||||
|
||||
#ifdef WINPR_SYNCHRONIZATION_BARRIER
|
||||
|
||||
typedef struct _RTL_BARRIER
|
||||
{
|
||||
@ -353,6 +357,7 @@ WINPR_API BOOL WINAPI EnterSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBa
|
||||
WINPR_API BOOL WINAPI DeleteSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBarrier);
|
||||
|
||||
#endif
|
||||
|
||||
/* Extended API */
|
||||
|
||||
WINPR_API VOID USleep(DWORD dwMicroseconds);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0602))
|
||||
#ifdef WINPR_SYNCHRONIZATION_BARRIER
|
||||
|
||||
#include <winpr/library.h>
|
||||
#include <winpr/interlocked.h>
|
||||
|
Loading…
Reference in New Issue
Block a user