summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64/SYS.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/amd64/SYS.h')
-rw-r--r--lib/libc/amd64/SYS.h37
1 files changed, 6 insertions, 31 deletions
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 */
OpenPOWER on IntegriCloud