summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2001-01-29 03:23:46 +0000
committerdeischen <deischen@FreeBSD.org>2001-01-29 03:23:46 +0000
commitca55abf319c2f815cb2c84655b25482829c1646d (patch)
treeffdfffc17ec6466cc6f96dfd93691c69a11f422c /lib
parent99d951b8404ce6f969ceda268a00bfe5f17d43e2 (diff)
downloadFreeBSD-src-ca55abf319c2f815cb2c84655b25482829c1646d.zip
FreeBSD-src-ca55abf319c2f815cb2c84655b25482829c1646d.tar.gz
Clean up syscall generation in libc by removing HIDDEN_SYSCALLS
and treating (almost) all system calls the same way: __sys_foo - actual syscall foo, _foo - weak definitions to __sys_foo Change PSEUDO syscalls (currently only _exit and _getlogin) to be __sys_foo (T) and _foo (W). Add $FreeBSD$ to a few files to satisfy commitprep. Suggested by: bde
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/Makefile18
-rw-r--r--lib/libc/alpha/SYS.h70
-rw-r--r--lib/libc/alpha/sys/Makefile.inc5
-rw-r--r--lib/libc/alpha/sys/Ovfork.S6
-rw-r--r--lib/libc/alpha/sys/fork.S6
-rw-r--r--lib/libc/alpha/sys/pipe.S6
-rw-r--r--lib/libc/alpha/sys/sigreturn.S4
-rw-r--r--lib/libc/amd64/SYS.h37
-rw-r--r--lib/libc/amd64/sys/Makefile.inc6
-rw-r--r--lib/libc/amd64/sys/pipe.S2
-rw-r--r--lib/libc/amd64/sys/sigreturn.S2
-rw-r--r--lib/libc/i386/SYS.h37
-rw-r--r--lib/libc/i386/sys/Makefile.inc6
-rw-r--r--lib/libc/i386/sys/fork.S2
-rw-r--r--lib/libc/i386/sys/pipe.S2
-rw-r--r--lib/libc/i386/sys/rfork.S2
-rw-r--r--lib/libc/i386/sys/sigreturn.S2
-rw-r--r--lib/libc/ia64/SYS.h65
-rw-r--r--lib/libc/ia64/sys/Makefile.inc6
-rw-r--r--lib/libc/ia64/sys/Ovfork.S4
-rw-r--r--lib/libc/ia64/sys/fork.S4
-rw-r--r--lib/libc/ia64/sys/pipe.S4
-rw-r--r--lib/libc/ia64/sys/sigreturn.S2
-rw-r--r--lib/libc/sys/Makefile.inc35
24 files changed, 79 insertions, 254 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 4a30e5d..cdb5011 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -16,24 +16,6 @@ INSTALL_PIC_ARCHIVE= yes
PRECIOUSLIB= yes
#
-# This is a list of syscalls that are renamed as __sys_{syscall}
-# so that libpthread and libc_r can override and/or replace them.
-# In the case of libc_r replacement functions are provided, whereas
-# libpthread can both override and provide replacement functions.
-#
-HIDDEN_SYSCALLS= _exit.o accept.o aio_suspend.o bind.o close.o connect.o \
- dup.o dup2.o execve.o fchflags.o fchmod.o fchown.o fcntl.o \
- flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \
- getpeername.o getsockname.o getsockopt.o ioctl.o \
- kevent.o listen.o \
- msync.o nanosleep.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
- recvmsg.o sched_yield.o select.o sendfile.o sendmsg.o sendto.o \
- setsockopt.o shutdown.o sigaction.o sigaltstack.o \
- sigpending.o sigprocmask.o sigreturn.o \
- sigsuspend.o socket.o \
- socketpair.o wait4.o write.o writev.o
-
-#
# Include make rules that are shared with libc_r.
#
.include "${.CURDIR}/Makefile.inc"
diff --git a/lib/libc/alpha/SYS.h b/lib/libc/alpha/SYS.h
index d53e1fb..94e9ee0 100644
--- a/lib/libc/alpha/SYS.h
+++ b/lib/libc/alpha/SYS.h
@@ -46,78 +46,32 @@ LLABEL(name,1):
#define SYSCALL(name) \
-LEAF(__CONCAT(_,name),0); /* XXX # of args? */ \
- WEAK_ALIAS(name, __CONCAT(_,name)); \
+LEAF(__CONCAT(__sys_,name),0); /* XXX # of args? */ \
+ WEAK_ALIAS(name, __CONCAT(__sys_,name)); \
+ WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_,name)); \
CALLSYS_ERROR(name)
#define SYSCALL_NOERROR(name) \
-LEAF(name,0); /* XXX # of args? */ \
+LEAF(__CONCAT(__sys_,name),0); /* XXX # of args? */ \
+ WEAK_ALIAS(name, __CONCAT(__sys_,name)); \
+ WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_,name)); \
CALLSYS_NOERROR(name)
#define RSYSCALL(name) \
SYSCALL(name); \
RET; \
-END(__CONCAT(_,name))
+END(__CONCAT(__sys_,name))
#define RSYSCALL_NOERROR(name) \
SYSCALL_NOERROR(name); \
RET; \
-END(name)
+END(__CONCAT(__sys_,name))
-#define PSEUDO(label,name) \
-LEAF(__CONCAT(_,label),0); /* XXX # of args? */ \
- WEAK_ALIAS(label, __CONCAT(_,label)); \
+#define PSEUDO(name) \
+LEAF(__CONCAT(__sys_,name),0); /* XXX # of args? */ \
+ WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_, name)); \
CALLSYS_ERROR(name); \
RET; \
-END(__CONCAT(_,label));
-
-#define PSEUDO_NOERROR(label,name) \
-LEAF(label,0); /* XXX # of args? */ \
- CALLSYS_NOERROR(name); \
- RET; \
-END(label);
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library.
- */
-/*
- * For the thread_safe versions, we prepend __sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PNAME(name) __CONCAT(__sys_,name)
-
-#define PCALL(name) \
- CALL(PNAME(name))
-
-#define PLEAF(name, args) \
-LEAF(PNAME(name),args)
-
-#define PEND(name) \
-END(PNAME(name))
-
-#define PSYSCALL(name) \
-PLEAF(name,0); /* XXX # of args? */ \
- WEAK_ALIAS(name, PNAME(name)); \
- WEAK_ALIAS(__CONCAT(_,name), PNAME(name)); \
- CALLSYS_ERROR(name)
-
-#define PRSYSCALL(name) \
-PLEAF(name,0); /* XXX # of args? */ \
- WEAK_ALIAS(name, PNAME(name)); \
- WEAK_ALIAS(__CONCAT(_,name), PNAME(name)); \
- CALLSYS_ERROR(name) \
- RET; \
-PEND(name)
-
-#define PPSEUDO(label,name) \
-PLEAF(label,0); /* XXX # of args? */ \
- WEAK_ALIAS(label, PNAME(label)); \
- WEAK_ALIAS(__CONCAT(_,label), PNAME(label)); \
- CALLSYS_ERROR(name); \
- RET; \
-PEND(label)
+END(__CONCAT(__sys_,name))
diff --git a/lib/libc/alpha/sys/Makefile.inc b/lib/libc/alpha/sys/Makefile.inc
index b034900..f6a1490 100644
--- a/lib/libc/alpha/sys/Makefile.inc
+++ b/lib/libc/alpha/sys/Makefile.inc
@@ -10,8 +10,5 @@ NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \
semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \
truncate.o uname.o vfork.o yield.o
-PSEUDO= _getlogin.o
+PSEUDO= _getlogin.o _exit.o
-# Pseudo syscalls that are renamed as __sys_{pseudo} so that libc_r
-# can override them with replacements.
-PSEUDOR= _exit.o
diff --git a/lib/libc/alpha/sys/Ovfork.S b/lib/libc/alpha/sys/Ovfork.S
index d8dd3e8..808a5a7 100644
--- a/lib/libc/alpha/sys/Ovfork.S
+++ b/lib/libc/alpha/sys/Ovfork.S
@@ -25,11 +25,13 @@
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
+ *
+ * $FreeBSD$
*/
#include "SYS.h"
-PSYSCALL(vfork)
+SYSCALL(vfork)
cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */
RET
-PEND(vfork)
+END(vfork)
diff --git a/lib/libc/alpha/sys/fork.S b/lib/libc/alpha/sys/fork.S
index a8fa754..295e588 100644
--- a/lib/libc/alpha/sys/fork.S
+++ b/lib/libc/alpha/sys/fork.S
@@ -25,11 +25,13 @@
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
+ *
+ * $FreeBSD$
*/
#include "SYS.h"
-PSYSCALL(fork)
+SYSCALL(fork)
cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */
RET
-PEND(fork)
+END(fork)
diff --git a/lib/libc/alpha/sys/pipe.S b/lib/libc/alpha/sys/pipe.S
index 76f44c2..188bfd4 100644
--- a/lib/libc/alpha/sys/pipe.S
+++ b/lib/libc/alpha/sys/pipe.S
@@ -25,13 +25,15 @@
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
+ *
+ * $FreeBSD$
*/
#include "SYS.h"
-PSYSCALL(pipe)
+SYSCALL(pipe)
stl v0, 0(a0)
stl a4, 4(a0)
mov zero, v0
RET
-PEND(pipe)
+END(pipe)
diff --git a/lib/libc/alpha/sys/sigreturn.S b/lib/libc/alpha/sys/sigreturn.S
index a186be6..0931f50 100644
--- a/lib/libc/alpha/sys/sigreturn.S
+++ b/lib/libc/alpha/sys/sigreturn.S
@@ -25,6 +25,8 @@
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
+ *
+ * $FreeBSD$
*/
#include "SYS.h"
@@ -35,4 +37,4 @@
* (XXX PROFILING)
*/
-PRSYSCALL(sigreturn)
+RSYSCALL(sigreturn)
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h
index 2d58562..ba56bce 100644
--- a/lib/libc/amd64/SYS.h
+++ b/lib/libc/amd64/SYS.h
@@ -42,32 +42,6 @@
#include "DEFS.h"
#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
- lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-
-#define RSYSCALL(x) SYSCALL(x); ret
-
-#define PSEUDO(x,y) ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-
-/* gas messes up offset -- although we don't currently need it, do for BCS */
-#define LCALL(x,y) .byte 0x9a ; .long y; .word x
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library.
- */
-/*
- * For the thread_safe versions, we prepend __sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(x); \
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
@@ -75,14 +49,15 @@
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define PRSYSCALL(x) PSYSCALL(x); ret
+#define RSYSCALL(x) SYSCALL(x); ret
-#define PPSEUDO(x,y) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
+#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
+ lea __CONCAT(SYS_,x), %eax; KERNCALL; ret
+
+/* gas messes up offset -- although we don't currently need it, do for BCS */
+#define LCALL(x,y) .byte 0x9a ; .long y; .word x
#ifdef __ELF__
#define KERNCALL int $0x80 /* Faster */
diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc
index 4a60875..98d9deb 100644
--- a/lib/libc/amd64/sys/Makefile.inc
+++ b/lib/libc/amd64/sys/Makefile.inc
@@ -14,11 +14,7 @@ NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \
semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \
truncate.o uname.o vfork.o yield.o
-PSEUDO= _getlogin.o
-
-# Pseudo syscalls that are renamed as __sys_{pseudo} so that libc_r can
-# override them with replacements.
-PSEUDOR= _exit.o
+PSEUDO= _getlogin.o _exit.o
.if ${LIB} == "c"
MAN2+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2
diff --git a/lib/libc/amd64/sys/pipe.S b/lib/libc/amd64/sys/pipe.S
index 1684611..fca1187 100644
--- a/lib/libc/amd64/sys/pipe.S
+++ b/lib/libc/amd64/sys/pipe.S
@@ -43,7 +43,7 @@
#include "SYS.h"
-PSYSCALL(pipe)
+SYSCALL(pipe)
movl 4(%esp),%ecx
movl %eax,(%ecx)
movl %edx,4(%ecx)
diff --git a/lib/libc/amd64/sys/sigreturn.S b/lib/libc/amd64/sys/sigreturn.S
index 7405c34..449149f 100644
--- a/lib/libc/amd64/sys/sigreturn.S
+++ b/lib/libc/amd64/sys/sigreturn.S
@@ -48,5 +48,5 @@
* must be saved. On FreeBSD, this is not the case.
*/
-PSYSCALL(sigreturn)
+SYSCALL(sigreturn)
ret
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h
index 2d58562..ba56bce 100644
--- a/lib/libc/i386/SYS.h
+++ b/lib/libc/i386/SYS.h
@@ -42,32 +42,6 @@
#include "DEFS.h"
#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
- lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-
-#define RSYSCALL(x) SYSCALL(x); ret
-
-#define PSEUDO(x,y) ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-
-/* gas messes up offset -- although we don't currently need it, do for BCS */
-#define LCALL(x,y) .byte 0x9a ; .long y; .word x
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library.
- */
-/*
- * For the thread_safe versions, we prepend __sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(x); \
.set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
@@ -75,14 +49,15 @@
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define PRSYSCALL(x) PSYSCALL(x); ret
+#define RSYSCALL(x) SYSCALL(x); ret
-#define PPSEUDO(x,y) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
+#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
.weak CNAME(__CONCAT(_,x)); \
.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
+ lea __CONCAT(SYS_,x), %eax; KERNCALL; ret
+
+/* gas messes up offset -- although we don't currently need it, do for BCS */
+#define LCALL(x,y) .byte 0x9a ; .long y; .word x
#ifdef __ELF__
#define KERNCALL int $0x80 /* Faster */
diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc
index 4a60875..98d9deb 100644
--- a/lib/libc/i386/sys/Makefile.inc
+++ b/lib/libc/i386/sys/Makefile.inc
@@ -14,11 +14,7 @@ NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \
semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \
truncate.o uname.o vfork.o yield.o
-PSEUDO= _getlogin.o
-
-# Pseudo syscalls that are renamed as __sys_{pseudo} so that libc_r can
-# override them with replacements.
-PSEUDOR= _exit.o
+PSEUDO= _getlogin.o _exit.o
.if ${LIB} == "c"
MAN2+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2
diff --git a/lib/libc/i386/sys/fork.S b/lib/libc/i386/sys/fork.S
index 6c3cde8..203f739 100644
--- a/lib/libc/i386/sys/fork.S
+++ b/lib/libc/i386/sys/fork.S
@@ -43,7 +43,7 @@
#include "SYS.h"
-PSYSCALL(fork)
+SYSCALL(fork)
cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */
je 1f
movl $0,%eax
diff --git a/lib/libc/i386/sys/pipe.S b/lib/libc/i386/sys/pipe.S
index 1684611..fca1187 100644
--- a/lib/libc/i386/sys/pipe.S
+++ b/lib/libc/i386/sys/pipe.S
@@ -43,7 +43,7 @@
#include "SYS.h"
-PSYSCALL(pipe)
+SYSCALL(pipe)
movl 4(%esp),%ecx
movl %eax,(%ecx)
movl %edx,4(%ecx)
diff --git a/lib/libc/i386/sys/rfork.S b/lib/libc/i386/sys/rfork.S
index b3e20e4..c5971c6 100644
--- a/lib/libc/i386/sys/rfork.S
+++ b/lib/libc/i386/sys/rfork.S
@@ -43,7 +43,7 @@
#include "SYS.h"
-PSYSCALL(rfork)
+SYSCALL(rfork)
cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */
je 1f
movl $0,%eax
diff --git a/lib/libc/i386/sys/sigreturn.S b/lib/libc/i386/sys/sigreturn.S
index 7405c34..449149f 100644
--- a/lib/libc/i386/sys/sigreturn.S
+++ b/lib/libc/i386/sys/sigreturn.S
@@ -48,5 +48,5 @@
* must be saved. On FreeBSD, this is not the case.
*/
-PSYSCALL(sigreturn)
+SYSCALL(sigreturn)
ret
diff --git a/lib/libc/ia64/SYS.h b/lib/libc/ia64/SYS.h
index 1cbc970..86fec08 100644
--- a/lib/libc/ia64/SYS.h
+++ b/lib/libc/ia64/SYS.h
@@ -38,72 +38,39 @@
#define SYSCALL(name) \
-ENTRY(_ ## name,0); /* XXX # of args? */ \
- WEAK_ALIAS(name, _ ## name); \
+ENTRY(__sys_ ## name,0); /* XXX # of args? */ \
+ WEAK_ALIAS(name, __sys_ ## name); \
+ WEAK_ALIAS(_ ## name, __sys_ ## name); \
CALLSYS_ERROR(name)
#define SYSCALL_NOERROR(name) \
-ENTRY(name,0); /* XXX # of args? */ \
+ENTRY(__sys_ ## name,0); /* XXX # of args? */ \
+ WEAK_ALIAS(name, __sys_ ## name); \
+ WEAK_ALIAS(_ ## name, __sys_ ## name); \
CALLSYS_NOERROR(name)
#define RSYSCALL(name) \
SYSCALL(name); \
br.ret.sptk.few rp; \
-END(_ ## name)
+END(__sys_ ## name)
#define RSYSCALL_NOERROR(name) \
SYSCALL_NOERROR(name); \
br.ret.sptk.few rp; \
-END(name)
-
-
-#define PSEUDO(label,name) \
-ENTRY(_ ## label,0); /* XXX # of args? */ \
- WEAK_ALIAS(label, _ ## label); \
- CALLSYS_ERROR(name); \
- br.ret.sptk.few rp; \
-END(_ ## label);
-
-#define PSEUDO_NOERROR(label,name) \
-ENTRY(label,0); /* XXX # of args? */ \
- CALLSYS_NOERROR(name); \
- br.ret.sptk.few rp; \
-END(label);
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library.
- */
-/*
- * For the thread_safe versions, we prepend __sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PCALL(name) \
- CALL(__sys_ ## name)
-
-#define PENTRY(name, args) \
-ENTRY(__sys_ ## name,args)
-
-#define PEND(name) \
END(__sys_ ## name)
-#define PSYSCALL(name) \
-PENTRY(name,0); /* XXX # of args? */ \
- CALLSYS_ERROR(name)
-#define PRSYSCALL(name) \
-PENTRY(_sys_ ## name,0); /* XXX # of args? */ \
- WEAK_ALIAS(name, __sys_ ## name); \
+#define PSEUDO(name) \
+ENTRY(__sys_ ## name,0); /* XXX # of args? */ \
WEAK_ALIAS(_ ## name, __sys_ ## name); \
- CALLSYS_ERROR(name) \
+ CALLSYS_ERROR(name); \
br.ret.sptk.few rp; \
-PEND(name)
+END(__sys_ ## name);
-#define PPSEUDO(label,name) \
-PENTRY(label,0); /* XXX # of args? */ \
- CALLSYS_ERROR(name); \
+#define PSEUDO_NOERROR(name) \
+ENTRY(__sys_ ## name,0); /* XXX # of args? */ \
+ WEAK_ALIAS(_ ## name, __sys_ ## name); \
+ CALLSYS_NOERROR(name); \
br.ret.sptk.few rp; \
-PEND(label)
+END(__sys_ ## name);
diff --git a/lib/libc/ia64/sys/Makefile.inc b/lib/libc/ia64/sys/Makefile.inc
index b034900..7d9a6c6 100644
--- a/lib/libc/ia64/sys/Makefile.inc
+++ b/lib/libc/ia64/sys/Makefile.inc
@@ -10,8 +10,4 @@ NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \
semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \
truncate.o uname.o vfork.o yield.o
-PSEUDO= _getlogin.o
-
-# Pseudo syscalls that are renamed as __sys_{pseudo} so that libc_r
-# can override them with replacements.
-PSEUDOR= _exit.o
+PSEUDO= _getlogin.o _exit.o
diff --git a/lib/libc/ia64/sys/Ovfork.S b/lib/libc/ia64/sys/Ovfork.S
index 666fd51..23ebccb 100644
--- a/lib/libc/ia64/sys/Ovfork.S
+++ b/lib/libc/ia64/sys/Ovfork.S
@@ -27,9 +27,9 @@
*/
#include "SYS.h"
-PSYSCALL(vfork)
+SYSCALL(vfork)
cmp.ne p6,p0=ret1,r0 /* ret1!=0 for child */
;;
(p6) mov ret0=r0
br.ret.sptk.few rp
-PEND(vfork)
+END(vfork)
diff --git a/lib/libc/ia64/sys/fork.S b/lib/libc/ia64/sys/fork.S
index 19a6dd2..65b6b21 100644
--- a/lib/libc/ia64/sys/fork.S
+++ b/lib/libc/ia64/sys/fork.S
@@ -27,9 +27,9 @@
*/
#include "SYS.h"
-PSYSCALL(fork)
+SYSCALL(fork)
cmp.ne p6,p0=ret1,r0 /* ret1!=0 for child */
;;
(p6) mov ret0=r0
br.ret.sptk.few rp
-PEND(fork)
+END(fork)
diff --git a/lib/libc/ia64/sys/pipe.S b/lib/libc/ia64/sys/pipe.S
index 8770563..3254341 100644
--- a/lib/libc/ia64/sys/pipe.S
+++ b/lib/libc/ia64/sys/pipe.S
@@ -30,10 +30,10 @@
#include "SYS.h"
-PSYSCALL(pipe)
+SYSCALL(pipe)
.regstk 1,0,0,0
st4 [in0]=ret0,4 ;;
st4 [in0]=ret1
mov ret0=0
br.ret.sptk.few rp
-PEND(pipe)
+END(pipe)
diff --git a/lib/libc/ia64/sys/sigreturn.S b/lib/libc/ia64/sys/sigreturn.S
index 7a31965..57416b1 100644
--- a/lib/libc/ia64/sys/sigreturn.S
+++ b/lib/libc/ia64/sys/sigreturn.S
@@ -36,4 +36,4 @@
* (XXX PROFILING)
*/
-PRSYSCALL(sigreturn)
+RSYSCALL(sigreturn)
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index b6629ec..b44cfff 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -16,60 +16,39 @@
.include "${.CURDIR}/../libc/${MACHINE_ARCH}/sys/Makefile.inc"
# Sources common to both syscall interfaces:
-SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c
-
-# Build __error() into libc, but not libc_r which has its own:
-.if ${LIB} == "c"
-SRCS+= __error.c
-.endif
+SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c __error.c
# Add machine dependent asm sources:
SRCS+=${MDASM}
# Look though the complete list of syscalls (MIASM) for names that are
# not defined with machine dependent implementations (MDASM) and are
-# not declared for no generation of default code (NOASM). If the
-# syscall is not hidden, add it to the ASM list, otherwise add it
-# to the ASMR list.
+# not declared for no generation of default code (NOASM). Add each
+# syscall that satisfies these conditions to the ASM list.
.for _asm in ${MIASM}
.if (${MDASM:R:M${_asm:R}} == "")
.if (${NOASM:R:M${_asm:R}} == "")
-.if (${HIDDEN_SYSCALLS:R:M${_asm:R}} == "")
ASM+=$(_asm)
-.else
-ASMR+=$(_asm)
-.endif
.endif
.endif
.endfor
-OBJS+= ${ASM} ${ASMR} ${PSEUDO} ${PSEUDOR}
+OBJS+= ${ASM} ${PSEUDO}
SASM= ${ASM:S/.o/.S/}
-SASMR= ${ASMR:S/.o/.S/}
-
SPSEUDO= ${PSEUDO:S/.o/.S/}
-SPSEUDOR= ${PSEUDOR:S/.o/.S/}
-
-SRCS+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
+SRCS+= ${SASM} ${SPSEUDO}
# Generated files
-CLEANFILES+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
+CLEANFILES+= ${SASM} ${SPSEUDO}
${SASM}:
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
-${SASMR}:
- printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.TARGET}
-
${SPSEUDO}:
- printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
- > ${.TARGET}
-
-${SPSEUDOR}:
- printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
+ printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \
> ${.TARGET}
.if ${LIB} == "c"
OpenPOWER on IntegriCloud