pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/kaffe Integrate patches from kaffe'cvs to fix thr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a64450fa9b1
branches:  trunk
changeset: 502468:0a64450fa9b1
user:      tonio <tonio%pkgsrc.org@localhost>
date:      Fri Nov 04 21:21:02 2005 +0000

description:
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:

 lang/kaffe/Makefile         |   4 ++-
 lang/kaffe/distinfo         |   6 +++-
 lang/kaffe/patches/patch-aa |  22 ++++++++++++++++--
 lang/kaffe/patches/patch-ae |  14 ++++++++++++
 lang/kaffe/patches/patch-ag |  51 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 91 insertions(+), 6 deletions(-)

diffs (143 lines):

diff -r acb29a876aba -r 0a64450fa9b1 lang/kaffe/Makefile
--- a/lang/kaffe/Makefile       Fri Nov 04 21:17:06 2005 +0000
+++ b/lang/kaffe/Makefile       Fri Nov 04 21:21:02 2005 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.65 2005/10/29 17:37:20 tonio Exp $
+# $NetBSD: Makefile,v 1.66 2005/11/04 21:21:02 tonio Exp $
 #
 
 .include "Makefile.common"
 
+PKGREVISION=           1
+
 CONFLICTS+=            kaffe-nox11-[0-9]*
 
 JAVA_WRAPPERS=         appletviewer jar java javac javadoc javah javakey \
diff -r acb29a876aba -r 0a64450fa9b1 lang/kaffe/distinfo
--- a/lang/kaffe/distinfo       Fri Nov 04 21:17:06 2005 +0000
+++ b/lang/kaffe/distinfo       Fri Nov 04 21:21:02 2005 +0000
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.16 2005/10/15 21:49:53 tonio Exp $
+$NetBSD: distinfo,v 1.17 2005/11/04 21:21:02 tonio Exp $
 
 SHA1 (kaffe-1.1.6.tar.gz) = 8987c3a596db89ddc793013eaf0fab5cf8730128
 RMD160 (kaffe-1.1.6.tar.gz) = 9fd1177a43923346f9a21e4c0e89015ae42c4dfa
 Size (kaffe-1.1.6.tar.gz) = 10779887 bytes
-SHA1 (patch-aa) = 24f3720fded5a786bd2c4af354433ab19298ff7f
+SHA1 (patch-aa) = 9a042663db270d706bb983ce3da7297fe016a458
 SHA1 (patch-ab) = e2ba7816d3b2c9bf850a4ad9aadec5d306a8115e
 SHA1 (patch-ac) = 287fa93128361897ea0fc1bc305004b336609c88
 SHA1 (patch-ad) = d952245f70a61459e527cd846b76dede1df226e4
+SHA1 (patch-ae) = fac9c2e3e6c711d05f9ddb9f3109c46895f2e835
 SHA1 (patch-af) = c170e9bb8c559db660ba2d6e7af716c29b981235
+SHA1 (patch-ag) = ee05e2356c118f048a6a712147b6ccff82a9478a
diff -r acb29a876aba -r 0a64450fa9b1 lang/kaffe/patches/patch-aa
--- a/lang/kaffe/patches/patch-aa       Fri Nov 04 21:17:06 2005 +0000
+++ b/lang/kaffe/patches/patch-aa       Fri Nov 04 21:21:02 2005 +0000
@@ -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 @@
  
  
  
-@@ -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 -r acb29a876aba -r 0a64450fa9b1 lang/kaffe/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/kaffe/patches/patch-ae       Fri Nov 04 21:21:02 2005 +0000
@@ -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 -r acb29a876aba -r 0a64450fa9b1 lang/kaffe/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/kaffe/patches/patch-ag       Fri Nov 04 21:21:02 2005 +0000
@@ -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
+               {



Home | Main Index | Thread Index | Old Index