pipeline: Fix issues with calling convention on 32-bit Windows

This commit is contained in:
rdb 2022-03-01 12:19:13 +01:00
parent cfc11ba430
commit 583c9f1857
3 changed files with 7 additions and 7 deletions

View File

@ -161,9 +161,9 @@ ALWAYS_INLINE void patomic_notify_one(volatile uint32_t *value);
ALWAYS_INLINE void patomic_notify_all(volatile uint32_t *value);
#ifdef _WIN32
EXPCL_DTOOL_DTOOLBASE extern BOOL (*_patomic_wait_func)(volatile VOID *, PVOID, SIZE_T, DWORD);
EXPCL_DTOOL_DTOOLBASE extern void (*_patomic_wake_one_func)(PVOID);
EXPCL_DTOOL_DTOOLBASE extern void (*_patomic_wake_all_func)(PVOID);
EXPCL_DTOOL_DTOOLBASE extern BOOL (__stdcall *_patomic_wait_func)(volatile VOID *, PVOID, SIZE_T, DWORD);
EXPCL_DTOOL_DTOOLBASE extern void (__stdcall *_patomic_wake_one_func)(PVOID);
EXPCL_DTOOL_DTOOLBASE extern void (__stdcall *_patomic_wake_all_func)(PVOID);
#elif !defined(__linux__) && defined(HAVE_POSIX_THREADS)
EXPCL_DTOOL_DTOOLBASE void _patomic_wait(const volatile uint32_t *value, uint32_t old);
EXPCL_DTOOL_DTOOLBASE void _patomic_notify_all(volatile uint32_t *value);

View File

@ -41,7 +41,7 @@ private:
MutexWin32Impl &_mutex;
CONDITION_VARIABLE _cvar = CONDITION_VARIABLE_INIT;
static BOOL (*_wait_func)(PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG);
static BOOL (__stdcall *_wait_func)(PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG);
friend class PStatClientImpl;
};

View File

@ -27,9 +27,9 @@ static patomic_flag _main_thread_known = ATOMIC_FLAG_INIT;
#if _WIN32_WINNT < 0x0601
// Requires Windows 7.
static DWORD (*EnableThreadProfiling)(HANDLE, DWORD, DWORD64, HANDLE *) = nullptr;
static DWORD (*DisableThreadProfiling)(HANDLE) = nullptr;
static DWORD (*ReadThreadProfilingData)(HANDLE, DWORD, PPERFORMANCE_DATA data) = nullptr;
static DWORD (__stdcall *EnableThreadProfiling)(HANDLE, DWORD, DWORD64, HANDLE *) = nullptr;
static DWORD (__stdcall *DisableThreadProfiling)(HANDLE) = nullptr;
static DWORD (__stdcall *ReadThreadProfilingData)(HANDLE, DWORD, PPERFORMANCE_DATA data) = nullptr;
static bool init_thread_profiling() {
static bool inited = false;