[m-dev.] diff: gc & Linux M68K

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Sep 21 00:05:50 AEST 1999


On 20-Sep-1999, Roman Hodek <Roman.Hodek at informatik.uni-erlangen.de> wrote:
> 
> The m68k signal handler has *three* arguments, like the alpha one.

OK, in that case I will commit the following patch to the version of
the GC that we distribute with Mercury.  This is of course untested
since I don't have a Linux M68K system.

Hans, it would be great if you could include this patch in the next
release of the GC.

Note that there were several places where it was assuming two arguments
for the M68K signal handler, not just the one place that I mentioned in
my previous mail.

Cheers,
	Fergus.

Index: os_dep.c
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/os_dep.c,v
retrieving revision 1.22
diff -u -u -r1.22 os_dep.c
--- os_dep.c	1999/09/16 20:04:34	1.22
+++ os_dep.c	1999/09/20 13:57:10
@@ -1633,8 +1633,12 @@
 #   else
       typedef struct sigcontext_struct s_c;
 #   endif
+#   if defined(ALPHA) || defined(M68K)
+      typedef void (* REAL_SIG_PF)(int, int, s_c *);
+#   else
+      typedef void (* REAL_SIG_PF)(int, s_c);
+#   endif
 #   ifdef ALPHA
-    typedef void (* REAL_SIG_PF)(int, int, s_c *);
     /* Retrieve fault address from sigcontext structure by decoding	*/
     /* instruction.							*/
     char * get_fault_addr(s_c *sc) {
@@ -1646,8 +1650,6 @@
 	faultaddr += (word) (((int)instr << 16) >> 16);
 	return (char *)faultaddr;
     }
-#   else /* !ALPHA */
-    typedef void (* REAL_SIG_PF)(int, s_c);
 #   endif /* !ALPHA */
 # endif
 
@@ -1683,7 +1685,7 @@
 #   endif
 # endif
 # if defined(LINUX)
-#   ifdef ALPHA
+#   if defined(ALPHA) || defined(M68K)
       void GC_write_fault_handler(int sig, int code, s_c * sc)
 #   else
       void GC_write_fault_handler(int sig, s_c sc)
@@ -1802,7 +1804,7 @@
 		    return;
 #		endif
 #		if defined (LINUX)
-#		    ifdef ALPHA
+#		    if defined(ALPHA) || defined(M68K)
 		        (*(REAL_SIG_PF)old_handler) (sig, code, sc);
 #		    else 
 		        (*(REAL_SIG_PF)old_handler) (sig, sc);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list