Fixes
authorceriel <none@none>
Thu, 3 Oct 1991 15:57:23 +0000 (15:57 +0000)
committerceriel <none@none>
Thu, 3 Oct 1991 15:57:23 +0000 (15:57 +0000)
mach/sparc/libsys/SYS.h
mach/sparc/libsys/fork.s
mach/sparc/libsys/sigtramp.s
mach/sparc/libsys/syscall.h

index 4fe24d5..2ca627f 100644 (file)
@@ -82,7 +82,7 @@ SYS.h
        LABEL(x); \
        BODY(x)
 
-#define BODY(x) \
+#define BODY1(x) \
        sys_call(x); \
        ta      %g0; \
        bgeu 0f; \
@@ -90,7 +90,9 @@ SYS.h
        or      %o5, %lo(cerror), %o5; \
        jmp     %o5; \
        nop; \
-0:; \
+0:;
+#define BODY(x) \
+       BODY1(x) \
        retl; \
        nop
 
index 99b4d21..351508f 100644 (file)
@@ -1,3 +1,9 @@
 #include "SYS.h"
 
-SYS_call_0(fork)
+LABEL_(fork); BODY1(fork)
+       orcc    %g0, %o1, %g0
+       bne,a   1f
+       clr     %o0
+1:
+       retl
+       nop
index ae64d2e..9a413c0 100644 (file)
@@ -48,6 +48,7 @@ __sigtramp:
 
        call    %g2
        nop
+       add     %fp, %g4, %sp           ! cannot trust %sp after call
        ld      [%fp + 0x5c], %o3
        ld      [%fp + 0x58], %i0
        ld      [%sp + 0xe4], %l1
index 03e66c1..0cc60ca 100644 (file)
@@ -9,6 +9,7 @@
 #define SYS_write 4
 #define SYS_open 5
 #define SYS_close 6
+#define SYS_wait4 7
 #define SYS_creat 8
 #define SYS_link 9
 #define SYS_unlink 10
@@ -56,7 +57,6 @@
 #define SYS_getpgrp 81
 #define SYS_setpgrp 82
 #define SYS_setitimer 83
-#define SYS_wait4 84
 #define SYS_swapon 85
 #define SYS_getitimer 86
 #define SYS_gethostname 87