This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
boem.cc nonstandard threads
- From: Marco Trudel <mtrudel at gmx dot ch>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 27 Jun 2006 12:52:30 +0200
- Subject: boem.cc nonstandard threads
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.
regards
Marco
--- libjava/boehm.cc
+++ libjava/boehm.cc
@@ -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