WIN-04.1: patch to gc.h to expose GC_CreateThread on Win32
Adam Megacz
patches@lists.megacz.com
Thu Jan 31 17:10:00 GMT 2002
2002-01-31 Adam Megacz
* gc.h: (GC_CreateThread) This function is now exposed on all
Win32 platforms.
Index: gc.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/gc.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 gc.h
*** gc.h 2002/01/25 18:06:23 1.6
--- gc.h 2002/02/01 01:01:41
*************** extern void GC_thr_init(); /* Needed for
*** 849,858 ****
#endif /* THREADS && !SRC_M3 */
! #if defined(GC_WIN32_THREADS) && defined(_WIN32_WCE)
# include <windows.h>
/*
* win32_threads.c implements the real WinMain, which will start a new thread
* to call GC_WinMain after initializing the garbage collector.
*/
--- 849,868 ----
#endif /* THREADS && !SRC_M3 */
! #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.
*/
*************** extern void GC_thr_init(); /* Needed for
*** 862,882 ****
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
! #endif
/*
* If you are planning on putting
--- 872,884 ----
LPWSTR lpCmdLine,
int nCmdShow );
! # ifndef GC_BUILD
! # define WinMain GC_WinMain
! # define CreateThread GC_CreateThread
! # endif
! # endif /* defined(_WIN32_WCE) */
! #endif /* defined(GC_WIN32_THREADS) */
/*
* If you are planning on putting
More information about the Java-patches
mailing list