[kaffe] CVS kaffe (guilhem): Fixes for IRIX

Kaffe CVS cvs-commits at kaffe.org
Sat Mar 12 08:12:29 PST 2005


PatchSet 5526 
Date: 2005/03/12 16:08:08
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixes for IRIX

	* kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h: Define
	SIGALTSTACK_NEEDS_END if the system is IRIX.

	* kaffe/kaffevm/systems/unix-jthreads/signal.c
	(setupSigAltStack): Put a pointer to he end of the stack if
	SIGALTSTACK_NEEDS_END is defined.

Members: 
	ChangeLog:1.3700->1.3701 
	kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h:1.11->1.12 
	kaffe/kaffevm/systems/unix-jthreads/signal.c:1.30->1.31 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3700 kaffe/ChangeLog:1.3701
--- kaffe/ChangeLog:1.3700	Sat Mar 12 15:36:04 2005
+++ kaffe/ChangeLog	Sat Mar 12 16:08:08 2005
@@ -1,3 +1,12 @@
+2005-03-12  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h: Define
+	SIGALTSTACK_NEEDS_END if the system is IRIX.
+
+	* kaffe/kaffevm/systems/unix-jthreads/signal.c
+	(setupSigAltStack): Put a pointer to he end of the stack if
+	SIGALTSTACK_NEEDS_END is defined.
+	
 2005-03-12  Dalibor Topic  <robilad at kaffe.org>
 
 	* config/alpha/jit.h:  Use translatorlock instead of 
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h:1.11 kaffe/kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h:1.12
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h:1.11	Sat Apr  3 02:57:45 2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/config-jthreads.h	Sat Mar 12 16:08:11 2005
@@ -101,6 +101,8 @@
 #define SP_OFFSET		2
 #define FP_OFFSET		13
 
+#define SIGALTSTACK_NEEDS_END   1
+
 #elif defined(arm32) && defined(__NetBSD__)
 
 #define SP_OFFSET		23
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.30 kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.31
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.30	Sun Jan  2 19:03:33 2005
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c	Sat Mar 12 16:08:11 2005
@@ -347,6 +347,7 @@
 setupSigAltStack(void)
 {
         STACK_STRUCT newstack;
+	void *stackp;
 
 	/*
 	 * Signals has to have their own stack so we can solve
@@ -354,7 +355,12 @@
 	 */
 	newstack.ss_size = THREADSTACKSIZE;
 	newstack.ss_flags = 0;
-	newstack.ss_sp = KMALLOC(newstack.ss_size);
+	stackp = KMALLOC(newstack.ss_size);
+#if defined(SIGALTSTACK_NEEDS_END)
+	newstack.ss_sp = (void *)((uintp)stackp + newstack.ss_size);
+#else
+	newstack.ss_sp = stackp;
+#endif
 	if (sigaltstack(&newstack, NULL) < 0)
 	  {
 	    dprintf("Unexpected error calling sigaltstack: %s\n",




More information about the kaffe mailing list