diff options
author | tonio <tonio@pkgsrc.org> | 2005-11-04 21:21:02 +0000 |
---|---|---|
committer | tonio <tonio@pkgsrc.org> | 2005-11-04 21:21:02 +0000 |
commit | 2bc841f3690b74aff853caaf3b9a578185a7dfe3 (patch) | |
tree | ebcd09323cf7d0eaa913d0de1fcf08888ed24bd6 /lang/kaffe/patches | |
parent | 99213f2c3525aa25f24d781e566a7863eb8b66f5 (diff) | |
download | pkgsrc-2bc841f3690b74aff853caaf3b9a578185a7dfe3.tar.gz |
Integrate patches from kaffe'cvs to fix thread signal handling on netbsd
Thanks guilhem_at_kaffe.org for those patches
(Now kaffe passes 100% of the regression tests under netbsd -current (at least i386))
bump PKGREVISION
Diffstat (limited to 'lang/kaffe/patches')
-rw-r--r-- | lang/kaffe/patches/patch-aa | 22 | ||||
-rw-r--r-- | lang/kaffe/patches/patch-ae | 14 | ||||
-rw-r--r-- | lang/kaffe/patches/patch-ag | 51 |
3 files changed, 84 insertions, 3 deletions
diff --git a/lang/kaffe/patches/patch-aa b/lang/kaffe/patches/patch-aa index d901bf376bd..c8ab3c15647 100644 --- a/lang/kaffe/patches/patch-aa +++ b/lang/kaffe/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.14 2005/10/11 10:00:15 tonio Exp $ +$NetBSD: patch-aa,v 1.15 2005/11/04 21:21:02 tonio Exp $ ---- configure.orig 2005-09-19 05:08:29.000000000 +0200 +--- configure.orig 2005-09-20 02:33:57.000000000 +0200 +++ configure @@ -490,7 +490,6 @@ ac_includes_default="\ #endif" @@ -24,7 +24,23 @@ $NetBSD: patch-aa,v 1.14 2005/10/11 10:00:15 tonio Exp $ -@@ -51688,7 +51687,6 @@ CLASSPATH_INCLUDES="-I\$(top_srcdir)/lib +@@ -25084,6 +25083,15 @@ echo "$as_me: error: Missing library lib + + VMLIBS="$VM_LIBS $PTHREAD_LIBS" + CPPFLAGS="$CPPFLAGS -D_REENTRANT" ++ ++ if test "x$Khost_os" = "xnetbsd1"; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define KAFFE_BUGGY_NETBSD_SIGWAIT 1 ++_ACEOF ++ ++ fi ++ + else + CPPFLAGS="$CPPFLAGS -DBR_PTHREADS=0" + fi +@@ -51688,7 +51696,6 @@ CLASSPATH_INCLUDES="-I\$(top_srcdir)/lib diff --git a/lang/kaffe/patches/patch-ae b/lang/kaffe/patches/patch-ae new file mode 100644 index 00000000000..5c44e018e3c --- /dev/null +++ b/lang/kaffe/patches/patch-ae @@ -0,0 +1,14 @@ +$NetBSD: patch-ae,v 1.5 2005/11/04 21:21:02 tonio Exp $ + +--- config/config.h.in.orig 2005-09-20 02:31:32.000000000 +0200 ++++ config/config.h.in +@@ -747,6 +747,9 @@ + /* additional directories to search for native jni libraries */ + #undef JNI_LIBRARY_PATH + ++/* Defined on NetBSD because sigwait needs the handle not to be registered */ ++#undef KAFFE_BUGGY_NETBSD_SIGWAIT ++ + /* Full path to the directory containing kaffe's locales */ + #undef KAFFE_LOCALEDIR + diff --git a/lang/kaffe/patches/patch-ag b/lang/kaffe/patches/patch-ag new file mode 100644 index 00000000000..c7e16237f9d --- /dev/null +++ b/lang/kaffe/patches/patch-ag @@ -0,0 +1,51 @@ +$NetBSD: patch-ag,v 1.5 2005/11/04 21:21:02 tonio Exp $ + +--- kaffe/kaffevm/systems/unix-pthreads/thread-impl.c.orig 2005-08-20 14:31:02.000000000 +0200 ++++ kaffe/kaffevm/systems/unix-pthreads/thread-impl.c +@@ -415,7 +415,7 @@ tInitSignalHandlers (void) + saResume.sa_flags = 0; /* Note that we do not want restart here. */ + saResume.sa_handler = resume_signal_handler; + saResume.sa_mask = saSuspend.sa_mask; +-#ifndef KAFFE_BOEHM_GC ++#if !defined(KAFFE_BOEHM_GC) && !defined(KAFFE_BUGGY_NETBSD_SIGWAIT) + sigaction( sigResume, &saResume, NULL); + #endif + +@@ -1275,7 +1275,12 @@ void KaffePThread_WaitForResume(int rele + + /* freeze until we get a subsequent sigResume */ + while( cur->suspendState == SS_SUSPENDED ) +- sigwait( &suspendSet, &s); ++ { ++ sigwait( &suspendSet, &s); ++ /* Post something even if it is not the right thread. */ ++ if (cur->suspendState == SS_SUSPENDED) ++ repsem_post(&critSem); ++ } + + DBG( JTHREADDETAIL, dprintf("sigwait return: %p\n", cur)); + +@@ -1497,13 +1502,17 @@ jthread_unsuspendall (void) + if ((t->blockState & (BS_SYSCALL|BS_CV|BS_CV_TO|BS_MUTEX)) == 0) + { + DBG (JTHREADDETAIL, dprintf(" sending sigResume\n")); +- status = pthread_kill( t->tid, sigResume); +- if ( status ) ++ do + { +- DBG( JTHREAD, dprintf("error sending RESUME signal to %p: %d\n", t, status)); +- } +- /* ack wait workaround, see jthread_suspendall remarks */ +- repsem_wait( &critSem); ++ status = pthread_kill( t->tid, sigResume); ++ if ( status ) ++ { ++ DBG( JTHREAD, dprintf("error sending RESUME signal to %p: %d\n", t, status)); ++ } ++ /* ack wait workaround, see jthread_suspendall remarks */ ++ repsem_wait( &critSem); ++ } ++ while (t->suspendState == SS_PENDING_RESUME); + } + else + { |