[kaffe] CVS kaffe (guilhem): Fixes for Solaris and Darwin.

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 11 10:49:59 PDT 2004


PatchSet 4929 
Date: 2004/07/11 17:44:52
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixes for Solaris and Darwin.

        * kaffe/kaffevm/ksem.c (ksemPut): Removed the assertion as
        the case may happen and is handled by ksemGet.

        * kaffe/kaffevm/systems/unix-jthreads/signal.c,
        kaffe/kaffevm/systems/unix-pthreads/signal.c
        (detectStackBoundaries): Made guessPointer a static volatile variable
        to remove the optimization and put the variable outside of the stack.

Members: 
	ChangeLog:1.2494->1.2495 
	kaffe/kaffevm/ksem.c:1.2->1.3 
	kaffe/kaffevm/systems/unix-jthreads/signal.c:1.23->1.24 
	kaffe/kaffevm/systems/unix-pthreads/signal.c:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2494 kaffe/ChangeLog:1.2495
--- kaffe/ChangeLog:1.2494	Sun Jul 11 13:33:16 2004
+++ kaffe/ChangeLog	Sun Jul 11 17:44:52 2004
@@ -1,3 +1,13 @@
+2004-07-11  Guilhem Lavaux <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/ksem.c (ksemPut): Removed the assertion as
+	the case may happen and is handled by ksemGet.
+
+	* kaffe/kaffevm/systems/unix-jthreads/signal.c,
+	kaffe/kaffevm/systems/unix-pthreads/signal.c
+	(detectStackBoundaries): Made guessPointer a static volatile variable
+	to remove the optimization and put the variable outside of the stack.
+
 2004-07-11  Helmer Kraemer  <hkraemer at freenet.de>
 
 	* libraries/javalib/java/lang/Package.java (getPackage, getPackages):
Index: kaffe/kaffe/kaffevm/ksem.c
diff -u kaffe/kaffe/kaffevm/ksem.c:1.2 kaffe/kaffe/kaffevm/ksem.c:1.3
--- kaffe/kaffe/kaffevm/ksem.c:1.2	Sat Jul 10 07:45:29 2004
+++ kaffe/kaffe/kaffevm/ksem.c	Sun Jul 11 17:44:55 2004
@@ -45,7 +45,6 @@
 	if (timeout == 0)
 		timeout = NOTIMEOUT;
 
-	jmutex_lock(&sem->mux);
 	/* If no stored wakeups, then sleep. */
 	if (sem->count == 0) {
 		(void)jcondvar_wait(&sem->cv, &sem->mux, timeout);
@@ -73,7 +72,6 @@
 ksemPut(Ksem* sem)
 {
 	jmutex_lock(&sem->mux);
-	assert(sem->count == 0);
         sem->count = 1;
 	jcondvar_signal(&sem->cv, &sem->mux);
 	jmutex_unlock(&sem->mux);
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.23 kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.24
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.23	Thu Jul  8 17:29:52 2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c	Sun Jul 11 17:44:55 2004
@@ -448,7 +448,7 @@
 void
 detectStackBoundaries(jthread_t jtid, int mainThreadStackSize)
 {
-	char *guessPointer;
+	static volatile char *guessPointer;
 
 	setupSigAltStack();
 
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.10 kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.11
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.10	Fri Jul  9 12:50:16 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c	Sun Jul 11 17:44:55 2004
@@ -441,7 +441,7 @@
 void
 detectStackBoundaries(jthread_t jtid, int mainThreadStackSize)
 {
-	char *guessPointer;
+	static volatile char *guessPointer;
 	void *handler_segv, *handler_bus;
 
 	setupSigAltStack();




More information about the kaffe mailing list