From 35dec51214f692110f441cd68a94cbd264574d18 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 6 Jan 2007 13:44:39 +0000 Subject: See ChangeLog --- implement.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'implement.h') diff --git a/implement.h b/implement.h index 82a7a8f..cf3c7f4 100644 --- a/implement.h +++ b/implement.h @@ -566,6 +566,7 @@ extern "C" int ptw32_cond_check_need_init (pthread_cond_t * cond); int ptw32_mutex_check_need_init (pthread_mutex_t * mutex); int ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); + int ptw32_spinlock_check_need_init (pthread_spinlock_t * spinlock); PTW32_INTERLOCKED_LONG WINAPI ptw32_InterlockedCompareExchange (PTW32_INTERLOCKED_LPLONG location, @@ -658,7 +659,9 @@ extern "C" # endif # endif #else -# include +# ifndef WINCE +# include +# endif #endif @@ -667,11 +670,21 @@ extern "C" * See ptw32_InterlockedCompareExchange.c */ #ifndef PTW32_INTERLOCKED_COMPARE_EXCHANGE -#ifdef _WIN64 -#define PTW32_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -#else -#define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_interlocked_compare_exchange -#endif +# ifdef _WIN64 + /* + * InterlockedCompareExchange is an intrinsic function in Win64. + */ +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# else + /* + * The routine pthread_win32_process_attach_np() in pthread_win32_attach_detach_np.c + * checks at runtime that InterlockedCompareExchange is supported within + * KERNEL32.DLL (or COREDLL.DLL for WinCE). This allows the same + * dll to run on all Win32 versions from Win95 onwards. Not sure if this + * is required for WinCE, but should work just the same anyway. + */ +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_interlocked_compare_exchange +# endif #endif #ifndef PTW32_INTERLOCKED_EXCHANGE -- cgit v1.2.3