summaryrefslogtreecommitdiff
path: root/devel/unproven-pthreads/patches/patch-ae
blob: 155e14491589fea5d9ebfa3d923d95aaa2667f83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$NetBSD: patch-ae,v 1.1 2000/12/28 03:56:53 wiz Exp $

--- machdep/syscall-template-alpha-netbsd-1.3.S.orig	Sat Nov  6 18:33:03 1999
+++ machdep/syscall-template-alpha-netbsd-1.3.S
@@ -1,11 +1,16 @@
 #include <machine/asm.h>
 #define COMPAT_43
 #include <sys/syscall.h>
-#define CHMK()		call_pal 0x83
+#define CHMK()         call_pal 0x83
 
 #ifdef SYS___sigsuspend14
 #define SYS_sigsuspend SYS___sigsuspend14
 #endif
+
+#ifdef SYS___sigaction14
+#define SYS_sigaction SYS___sigaction14
+#endif
+
 #ifdef SYS___sigprocmask14
 #define SYS_sigprocmask SYS___sigprocmask14
 #endif
@@ -14,11 +19,11 @@
 
 /* Kernel syscall interface:
    Input:
-	v0 - system call number
-	a* - arguments, as in C
+       v0 - system call number
+       a* - arguments, as in C
    Output:
-	a3 - zero iff successful
-	v0 - errno value on failure, else result
+       a3 - zero iff successful
+       v0 - errno value on failure, else result
 
    This macro is similar to SYSCALL in asm.h, but not completely.
    There's room for optimization, if we assume this will continue to
@@ -26,28 +31,28 @@
 
    This macro expansions does not include the return instruction.
    If there's no other work to be done, use something like:
-	SYSCALL(foo) ; ret
+       SYSCALL(foo) ; ret
    If there is other work to do (in fork, maybe?), do it after the
    SYSCALL invocation.  */
 
 #define SYSCALL(x) \
-	.align	4					;\
-	.globl	machdep_sys_##x				;\
-	.ent	machdep_sys_##x, 0			;\
-machdep_sys_##x:					;\
-	.frame	sp,0,ra					;\
-	ldiq	v0, SYS_##x				;\
-	CHMK()						;\
-	beq	a3, Lsys_noerr_##x			;\
-	br	gp, Lsys_err_##x			;\
-Lsys_err_##x:						;\
-	/* Load gp so we can find cerror to jump to.  */;\
-	ldgp	gp, 0(gp)				;\
-	jmp	zero, machdep_cerror			;\
+       .align  4                                       ;\
+       .globl  machdep_sys_##x                         ;\
+       .ent    machdep_sys_##x, 0                      ;\
+machdep_sys_##x:                                       ;\
+       .frame  sp,0,ra                                 ;\
+       ldiq    v0, SYS_##x                             ;\
+       CHMK()                                          ;\
+       beq     a3, Lsys_noerr_##x                      ;\
+       br      gp, Lsys_err_##x                        ;\
+Lsys_err_##x:                                          ;\
+       /* Load gp so we can find cerror to jump to.  */;\
+       ldgp    gp, 0(gp)                               ;\
+       jmp     zero, machdep_cerror                    ;\
 Lsys_noerr_##x:
 
-#define SIMPLE_SYSCALL(x)	SYSCALL(x) ; ret ; .end machdep_sys_##x
+#define SIMPLE_SYSCALL(x)      SYSCALL(x) ; ret ; .end machdep_sys_##x
 
-#define XSYSCALL(x)	SIMPLE_SYSCALL(x)
+#define XSYSCALL(x)    SIMPLE_SYSCALL(x)
 
 XSYSCALL(SYSCALL_NAME)