summaryrefslogtreecommitdiff
path: root/lib/libc/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/arch/alpha')
-rw-r--r--lib/libc/arch/alpha/SYS.h59
-rw-r--r--lib/libc/arch/alpha/sys/Ovfork.S6
-rw-r--r--lib/libc/arch/alpha/sys/exect.S8
-rw-r--r--lib/libc/arch/alpha/sys/fork.S6
-rw-r--r--lib/libc/arch/alpha/sys/sigpending.S6
-rw-r--r--lib/libc/arch/alpha/sys/sigprocmask.S8
-rw-r--r--lib/libc/arch/alpha/sys/sigsuspend.S6
7 files changed, 65 insertions, 34 deletions
diff --git a/lib/libc/arch/alpha/SYS.h b/lib/libc/arch/alpha/SYS.h
index d3c79a55ec9..499381760a0 100644
--- a/lib/libc/arch/alpha/SYS.h
+++ b/lib/libc/arch/alpha/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.3 1996/11/13 20:46:47 niklas Exp $ */
+/* $OpenBSD: SYS.h,v 1.4 1999/01/06 06:10:12 d Exp $ */
/* $NetBSD: SYS.h,v 1.4 1996/10/17 03:03:53 cgd Exp $ */
/*
@@ -41,29 +41,60 @@ LLABEL(name,0): \
jmp zero, cerror; \
LLABEL(name,1):
+#define __LEAF(p,n,e) \
+ LEAF(___CONCAT(p,n),e)
+#define __END(p,n) \
+ END(___CONCAT(p,n))
-#define SYSCALL(name) \
-LEAF(name,0); /* XXX # of args? */ \
+#define __SYSCALL(p,name) \
+__LEAF(p,name,0); /* XXX # of args? */ \
CALLSYS_ERROR(name)
-#define SYSCALL_NOERROR(name) \
-LEAF(name,0); /* XXX # of args? */ \
+#define __SYSCALL_NOERROR(p,name) \
+__LEAF(p,name,0); /* XXX # of args? */ \
CALLSYS_NOERROR(name)
-#define RSYSCALL(name) \
- SYSCALL(name); \
+#define __RSYSCALL(p,name) \
+ __SYSCALL(p,name); \
RET; \
-END(name)
+__END(p,name)
-#define RSYSCALL_NOERROR(name) \
- SYSCALL_NOERROR(name); \
+#define __RSYSCALL_NOERROR(p,name) \
+ __SYSCALL_NOERROR(p,name); \
RET; \
-END(name)
+__END(p,name)
-#define PSEUDO(label,name) \
-LEAF(label,0); /* XXX # of args? */ \
+#define __PSEUDO(p,label,name) \
+__LEAF(p,label,0); /* XXX # of args? */ \
CALLSYS_NOERROR(name); \
RET; \
-END(label);
+__END(p,label);
+
+
+#ifdef _THREAD_SAFE
+/*
+ * For the thread_safe versions, we prepend _thread_sys_ to the function
+ * name so that the 'C' wrapper can go around the real name.
+ */
+# define SYSCALL(x) __SYSCALL(_thread_sys_,x)
+# define SYSCALL_NOERROR(x) __SYSCALL_NOERROR(_thread_sys_,x)
+# define RSYSCALL(x) __RSYSCALL(_thread_sys_,x)
+# define RSYSCALL_NOERROR(x) __RSYSCALL_NOERROR(_thread_sys_,x)
+# define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y)
+# define SYSLEAF(x,e) __LEAF(_thread_sys_,x,e)
+# define SYSEND(x) __END(_thread_sys_,x)
+#else _THREAD_SAFE
+/*
+ * The non-threaded library defaults to traditional syscalls where
+ * the function name matches the syscall name.
+ */
+# define SYSCALL(x) __SYSCALL(,x)
+# define SYSCALL_NOERROR(x) __SYSCALL_NOERROR(,x)
+# define RSYSCALL(x) __RSYSCALL(,x)
+# define RSYSCALL_NOERROR(x) __RSYSCALL_NOERROR(,x)
+# define PSEUDO(x,y) __PSEUDO(,x,y)
+# define SYSLEAF(x,e) __LEAF(,x,e)
+# define SYSEND(x) __END(,x)
+#endif _THREAD_SAFE
diff --git a/lib/libc/arch/alpha/sys/Ovfork.S b/lib/libc/arch/alpha/sys/Ovfork.S
index 334dc38202d..3b7cb1a923c 100644
--- a/lib/libc/arch/alpha/sys/Ovfork.S
+++ b/lib/libc/arch/alpha/sys/Ovfork.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: Ovfork.S,v 1.3 1996/11/13 22:05:10 niklas Exp $ */
+/* $OpenBSD: Ovfork.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: Ovfork.S,v 1.1 1995/02/10 17:50:29 cgd Exp $ */
/*
@@ -32,10 +32,10 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: Ovfork.S,v 1.3 1996/11/13 22:05:10 niklas Exp $"
+ .asciz "$OpenBSD: Ovfork.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
SYSCALL(vfork)
cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */
RET
-END(vfork)
+SYSEND(vfork)
diff --git a/lib/libc/arch/alpha/sys/exect.S b/lib/libc/arch/alpha/sys/exect.S
index f1e2353129b..8df6fa61661 100644
--- a/lib/libc/arch/alpha/sys/exect.S
+++ b/lib/libc/arch/alpha/sys/exect.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: exect.S,v 1.3 1996/11/13 22:05:11 niklas Exp $ */
+/* $OpenBSD: exect.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: exect.S,v 1.2 1996/10/17 03:08:18 cgd Exp $ */
/*
@@ -32,10 +32,10 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: exect.S,v 1.3 1996/11/13 22:05:11 niklas Exp $"
+ .asciz "$OpenBSD: exect.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
-LEAF(exect, 3)
+SYSLEAF(exect, 3)
CALLSYS_ERROR(execve)
RET
-END(exect)
+SYSEND(exect)
diff --git a/lib/libc/arch/alpha/sys/fork.S b/lib/libc/arch/alpha/sys/fork.S
index 142458eb821..126c24d4cc5 100644
--- a/lib/libc/arch/alpha/sys/fork.S
+++ b/lib/libc/arch/alpha/sys/fork.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fork.S,v 1.3 1996/11/13 22:05:12 niklas Exp $ */
+/* $OpenBSD: fork.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: fork.S,v 1.1 1995/02/10 17:50:34 cgd Exp $ */
/*
@@ -32,10 +32,10 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: fork.S,v 1.3 1996/11/13 22:05:12 niklas Exp $"
+ .asciz "$OpenBSD: fork.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
SYSCALL(fork)
cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */
RET
-END(fork)
+SYSEND(fork)
diff --git a/lib/libc/arch/alpha/sys/sigpending.S b/lib/libc/arch/alpha/sys/sigpending.S
index b13c191471a..34d44fec5fb 100644
--- a/lib/libc/arch/alpha/sys/sigpending.S
+++ b/lib/libc/arch/alpha/sys/sigpending.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigpending.S,v 1.3 1996/11/13 22:05:14 niklas Exp $ */
+/* $OpenBSD: sigpending.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: sigpending.S,v 1.1 1995/02/10 17:50:40 cgd Exp $ */
/*
@@ -32,11 +32,11 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: sigpending.S,v 1.3 1996/11/13 22:05:14 niklas Exp $"
+ .asciz "$OpenBSD: sigpending.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
SYSCALL(sigpending)
stl v0, 0(a0)
mov zero, v0
RET
-END(sigpending)
+SYSEND(sigpending)
diff --git a/lib/libc/arch/alpha/sys/sigprocmask.S b/lib/libc/arch/alpha/sys/sigprocmask.S
index b74ccfb9079..d21042c9059 100644
--- a/lib/libc/arch/alpha/sys/sigprocmask.S
+++ b/lib/libc/arch/alpha/sys/sigprocmask.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigprocmask.S,v 1.3 1996/11/13 22:05:15 niklas Exp $ */
+/* $OpenBSD: sigprocmask.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: sigprocmask.S,v 1.2 1996/10/17 03:08:21 cgd Exp $ */
/*
@@ -32,10 +32,10 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: sigprocmask.S,v 1.3 1996/11/13 22:05:15 niklas Exp $"
+ .asciz "$OpenBSD: sigprocmask.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
-LEAF(sigprocmask, 3)
+SYSLEAF(sigprocmask, 3)
mov a2, a5 /* safe */
cmoveq a1, 1, a0 /* if set == NULL, how = SIG_BLOCK */
beq a1, Ldoit /* and set = 0, and do it. */
@@ -46,4 +46,4 @@ Ldoit: CALLSYS_ERROR(sigprocmask)
Lret: mov zero, v0
RET
- END(sigprocmask)
+SYSEND(sigprocmask)
diff --git a/lib/libc/arch/alpha/sys/sigsuspend.S b/lib/libc/arch/alpha/sys/sigsuspend.S
index 0d4717e098d..f4e3840ed49 100644
--- a/lib/libc/arch/alpha/sys/sigsuspend.S
+++ b/lib/libc/arch/alpha/sys/sigsuspend.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigsuspend.S,v 1.3 1996/11/13 22:05:16 niklas Exp $ */
+/* $OpenBSD: sigsuspend.S,v 1.4 1999/01/06 06:10:13 d Exp $ */
/* $NetBSD: sigsuspend.S,v 1.2 1996/10/17 03:08:22 cgd Exp $ */
/*
@@ -32,7 +32,7 @@
#if defined(SYSLIBC_SCCS)
.text
- .asciz "$OpenBSD: sigsuspend.S,v 1.3 1996/11/13 22:05:16 niklas Exp $"
+ .asciz "$OpenBSD: sigsuspend.S,v 1.4 1999/01/06 06:10:13 d Exp $"
#endif /* SYSLIBC_SCCS */
LEAF(sigsuspend, 1)
@@ -40,4 +40,4 @@ LEAF(sigsuspend, 1)
CALLSYS_ERROR(sigsuspend)
mov zero, v0 /* shouldn't need; just in case... */
RET
-END(sigsuspend)
+SYSEND(sigsuspend)