summaryrefslogtreecommitdiff
path: root/boehm-gc/include/gc.h
diff options
context:
space:
mode:
authormegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 03:56:40 +0000
committermegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 03:56:40 +0000
commitef8fa395ef96991797eaa5187476966522684d03 (patch)
tree6c3ed013c8e8ef078276d9712ba1ca29f2699f19 /boehm-gc/include/gc.h
parent2a8dfff3f974ba56056ce7f5ebc5737a6a3f5849 (diff)
downloadgcc-ef8fa395ef96991797eaa5187476966522684d03.tar.gz
2002-02-06 Adam Megacz <adam@xwt.org>
* boehm-gc/include/gc.h: (GC_CreateThread) This function is now exposed on all Win32 platforms. * boehm-gc/win32_threads.c: (GC_CreateThread) This now compiles on Win32; it invokes CreateThread() if GC is built as a DLL; otherwise it registers the thread. * boehm-gc/misc.c (GC_init): Initialize GC_allocate_ml in case libgcjgc was not built as a DLL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/include/gc.h')
-rw-r--r--boehm-gc/include/gc.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
index 46924251201..9e5447b0458 100644
--- a/boehm-gc/include/gc.h
+++ b/boehm-gc/include/gc.h
@@ -849,10 +849,20 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
#endif /* THREADS && !SRC_M3 */
-#if defined(GC_WIN32_THREADS) && defined(_WIN32_WCE)
+#if defined(GC_WIN32_THREADS)
# include <windows.h>
/*
+ * All threads must be created using GC_CreateThread, so that they will be
+ * recorded in the thread table.
+ */
+ HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
+
+# if defined(_WIN32_WCE)
+ /*
* win32_threads.c implements the real WinMain, which will start a new thread
* to call GC_WinMain after initializing the garbage collector.
*/
@@ -862,21 +872,13 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
LPWSTR lpCmdLine,
int nCmdShow );
- /*
- * All threads must be created using GC_CreateThread, so that they will be
- * recorded in the thread table.
- */
- HANDLE WINAPI GC_CreateThread(
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
- LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
-
-# ifndef GC_BUILD
-# define WinMain GC_WinMain
-# define CreateThread GC_CreateThread
-# endif
+# ifndef GC_BUILD
+# define WinMain GC_WinMain
+# define CreateThread GC_CreateThread
+# endif
+# endif /* defined(_WIN32_WCE) */
-#endif
+#endif /* defined(GC_WIN32_THREADS) */
/*
* If you are planning on putting