This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: boem.cc nonstandard threads
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: Marco Trudel <mtrudel at gmx dot ch>
- Cc: java-patches at gcc dot gnu dot org
- Date: Tue, 27 Jun 2006 13:34:41 -0400
- Subject: Re: boem.cc nonstandard threads
- References: <44A10DEE.1020300@gmx.ch>
Marco Trudel wrote:
Hello list
gc.h has:
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
GC_API void GC_suspend_thread GC_PROTO((pthread_t));
GC_API void GC_resume_thread GC_PROTO((pthread_t));
#endif
But boehm.cc has:
void
_Jv_SuspendThread (_Jv_Thread_t *thread)
{
GC_suspend_thread (_Jv_GetPlatformThreadID (thread));
}
void
_Jv_ResumeThread (_Jv_Thread_t *thread)
{
GC_resume_thread (_Jv_GetPlatformThreadID (thread));
}
Thus, compiling for example with "--enable-threads=win32" will fail...
So, either GC_suspend_thread and GC_resume_thread has to be available
for all threading models or the _Jv_SuspendThread and _Jv_ResumeThread
functions have to be constrained.
I assume the second one (but really don't know) and have attached a
patch for it... I'm not having commiting rights (unless anonymous has
;-)), so, if the patch is correct, someone ought to commit it.
I tested this patch on Darwin and x86-64 Linux and it works around the build
failure. Bryce or Keith will have to fix this properly when they're available.
For now I've committed this on Marco's behalf.
Tom
2006-06-27 Marco Trudel <mtrudel@gmx.ch>
* boehm.cc (_Jv_SuspendThread, _Jv_ResumeThread): Define
conditionally on GC_PTHREADS, !GC_SOLARIS_THREADS,
!GC_WIN32_THREADS and !GC_DARWIN_THREADS.
Index: boehm.cc
===================================================================
--- boehm.cc (revision 115021)
+++ boehm.cc (working copy)
@@ -673,6 +673,9 @@
#endif
}
+#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
+
void
_Jv_SuspendThread (_Jv_Thread_t *thread)
{
@@ -684,3 +687,5 @@
{
GC_resume_thread (_Jv_GetPlatformThreadID (thread));
}
+
+#endif