PatchSet 7528 
Date: 2007/08/09 01:24:56
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fixes for pthreads under Cygwin

Members: 
        ChangeLog:1.5026->1.5027 
        kaffe/kaffevm/systems/unix-pthreads/signal.c:1.28->1.29 
        kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.96->1.97 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5026 kaffe/ChangeLog:1.5027
--- kaffe/ChangeLog:1.5026      Wed Aug  8 23:38:48 2007
+++ kaffe/ChangeLog     Thu Aug  9 01:24:56 2007
@@ -1,3 +1,17 @@
+2007-08-09  Kazuyuki Shudo  <[EMAIL PROTECTED]>
+
+       This brings pthreads failures on Cygwin down to 11 for intrp,
+       and 24 for jit.
+
+       * kaffe/kaffevm/unix-pthreads/signal.c 
+       (KaffePThread_detectStackBoundaries) Work around Cygwin 
+       getpagesize issue. [STACK_GROWS_UP] Add pagesize to 
+       guessPointer.
+
+       * kaffe/kaffevm/unix-pthreads/thread-impl.c 
+       (tInitSignals) Treat Cygwin like OLD_LINUXTHREADS.
+       [__CYGWIN__] Set sigInterrupt to SIGCONT.
+
 2007-08-09  Kiyo Inaba <[EMAIL PROTECTED]>
 
        * config/arm/netbsd1/md.h: Added signal handler macro.
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.28 
kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.29
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.28     Tue Aug  7 
01:44:53 2007
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c  Thu Aug  9 01:24:56 2007
@@ -461,7 +461,12 @@
        
        if (JTHREAD_SETJMP(outOfLoop) == 0)
        {
+#ifdef __CYGWIN__
+         /* getpagesize() of Cygwin 1.5.19-4 returns 0x10000, not 0x1000 */
+         uintp pageSize = 0x1000;
+#else
          uintp pageSize = getpagesize();
+#endif
 
          guessPointer = (char *)((uintp)(&jtid) & ~(pageSize-1));
          
@@ -474,6 +479,11 @@
 #endif
            kaffeNoopFunc(*guessPointer);
          }
+       }
+       else {
+#if defined(STACK_GROWS_UP)
+         guessPointer += pageSize;
+#endif
        }
 
        /* Here we have detected one the boundary of the stack.
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.96 
kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.97
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.96        Tue Aug 
 7 01:44:53 2007
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c     Thu Aug  9 
01:24:56 2007
@@ -451,7 +451,7 @@
 
   if (SIGRTMAX - SIGRTMIN < 7)
     {
-#if defined(OLD_LINUXTHREADS)
+#if defined(OLD_LINUXTHREADS) && !defined(__CYGWIN__)
       sigSuspend = SIGURG;
       sigResume  = SIGTSTP;
       sigDump    = SIGXCPU;
@@ -474,8 +474,7 @@
 
 #endif
 
-      if (SIGRTMIN < 0)
-       sigInterrupt = SIGCONT;
+      sigInterrupt = SIGCONT;
     }
   else
     {

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to