This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [boehm-gc] Import 6.3 alpha 1
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: gcc-patches at gcc dot gnu dot org, jsturm at one-point dot com
- Cc: java-patche at gcc dot gnu dot org
- Date: Tue, 29 Jul 2003 19:42:18 +1000 (EST)
- Subject: Re: [boehm-gc] Import 6.3 alpha 1
Jeff Sturm wrote:
>I've merged the current boehm-gc release into the GCC tree. This release
>improves support for darwin and mingw/cygwin (among other things; these
>targets happen to be significant to gcj and poorly supported in releases
>up to and including 3.3). The actual diff is quite large and boring, so
>I've omitted it from this message.
Hello,
The following change to include/gc.h is necessary to build merged boehm-gc on
mingw32. The WINAPI (stdcall) attribute was used prior to merge and make
GC_CreateThread consistent with win32api CreateThread. The patch to win32_threads.c
silences a couple of warnings.
This builds on trunk with mingw32, but I cannot test there because of
other problems. Backport of the whole GC 6.3alpha1 boehm-gc directory to
3_3 branch also builds. 3_3-branch testsuite is in progress.
2003-07-29 Danny Smith <dannysmith@users.sourceforge.net>
* include/gc.h (GC_CreateThread): Declare with WINAPI
attribute.
* win32_threads.c (GC_CreateThread): Make definitions consistent
with declaration. Cast &thread_table[i].handle to PHANDLE
in call to DuplicateHandle
(thread_start): Declare as static.
Index: win32_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/win32_threads.c,v
retrieving revision 1.14
diff -c -3 -p -r1.14 win32_threads.c
*** win32_threads.c 28 Jul 2003 04:18:21 -0000 1.14
--- win32_threads.c 29 Jul 2003 08:49:33 -0000
*************** void GC_get_next_stack(char *start, char
*** 376,382 ****
/* We register threads from DllMain */
! GC_API HANDLE GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
--- 376,382 ----
/* We register threads from DllMain */
! GC_API HANDLE WINAPI GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
*************** typedef struct {
*** 397,405 ****
LPVOID param;
} thread_args;
! DWORD WINAPI thread_start(LPVOID arg);
! HANDLE WINAPI GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
--- 397,405 ----
LPVOID param;
} thread_args;
! static DWORD WINAPI thread_start(LPVOID arg);
! GC_API HANDLE WINAPI GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
*************** HANDLE WINAPI GC_CreateThread(
*** 445,451 ****
if (!DuplicateHandle(GetCurrentProcess(),
thread_h,
GetCurrentProcess(),
! &thread_table[i].handle,
0,
0,
DUPLICATE_SAME_ACCESS)) {
--- 445,451 ----
if (!DuplicateHandle(GetCurrentProcess(),
thread_h,
GetCurrentProcess(),
! (PHANDLE) &thread_table[i].handle,
0,
0,
DUPLICATE_SAME_ACCESS)) {
Index: include/gc.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/gc.h,v
retrieving revision 1.10
diff -c -3 -p -r1.10 gc.h
*** include/gc.h 28 Jul 2003 04:18:22 -0000 1.10
--- include/gc.h 29 Jul 2003 08:49:36 -0000
*************** extern void GC_thr_init(); /* Needed for
*** 895,901 ****
* and does then use DllMain to keep track of thread creations. But new code
* should be built to call GC_CreateThread.
*/
! GC_API HANDLE GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
--- 895,901 ----
* and does then use DllMain to keep track of thread creations. But new code
* should be built to call GC_CreateThread.
*/
! GC_API HANDLE WINAPI GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
http://personals.yahoo.com.au - Yahoo! Personals
- New people, new possibilities! Try Yahoo! Personals, FREE for a limited period!