summaryrefslogtreecommitdiffstats
path: root/lib/libc/alpha/SYS.h
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/libc/alpha/SYS.h
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/libc/alpha/SYS.h')
-rw-r--r--lib/libc/alpha/SYS.h70
1 files changed, 12 insertions, 58 deletions
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))
OpenPOWER on IntegriCloud