summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32_threads.c')
-rwxr-xr-xwin32_threads.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/win32_threads.c b/win32_threads.c
index e0d19d5..b56388a 100755
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -1,4 +1,4 @@
-#if defined(GC_WIN32_THREADS) || defined(WIN32_THREADS)
+#if defined(GC_WIN32_THREADS)
#include "private/gc_priv.h"
@@ -331,8 +331,18 @@ void GC_get_next_stack(char *start, char **lo, char **hi)
if (*lo < start) *lo = start;
}
+#if !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL))
-# ifdef MSWINCE
+HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+{
+ return CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress,
+ lpParameter, dwCreationFlags, lpThreadId);
+}
+
+#else /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */
typedef struct {
HANDLE child_ready_h, parent_ready_h;
@@ -450,6 +460,9 @@ static DWORD WINAPI thread_start(LPVOID arg)
return ret;
}
+#endif /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */
+
+#ifdef MSWINCE
typedef struct {
HINSTANCE hInstance;
@@ -614,4 +627,4 @@ BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved)
# endif /* !MSWINCE */
-#endif /* WIN32_THREADS */
+#endif /* GC_WIN32_THREADS */