summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index 2b99d53..2f0bc37 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -91,11 +91,22 @@ pthread_win32_process_attach_np ()
#endif
+#ifdef WINCE
+
+ /*
+ * Load COREDLL and try to get address of InterlockedCompareExchange
+ */
+ ptw32_h_kernel32 = LoadLibrary (TEXT ("COREDLL.DLL"));
+
+#else
+
/*
* Load KERNEL32 and try to get address of InterlockedCompareExchange
*/
ptw32_h_kernel32 = LoadLibrary (TEXT ("KERNEL32.DLL"));
+#endif
+
ptw32_interlocked_compare_exchange =
(PTW32_INTERLOCKED_LONG (WINAPI *)
(PTW32_INTERLOCKED_LPLONG, PTW32_INTERLOCKED_LONG,