diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-06 18:19:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-06 18:19:20 +0000 |
commit | cbf513969d15cf3c78d5c5ea656aabd58d7a19fc (patch) | |
tree | f541ba13a01530e589c53377043f0e5836a8019d /lib/libc | |
parent | a44832e297b3884b4311cdea96092bde90c9ebd6 (diff) |
make old & new SYSENTRY macros
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/amd64/SYS.h | 19 | ||||
-rw-r--r-- | lib/libc/arch/x86_64/SYS.h | 19 |
2 files changed, 24 insertions, 14 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h index bdf0bfe6d03..f6364d9553a 100644 --- a/lib/libc/arch/amd64/SYS.h +++ b/lib/libc/arch/amd64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.1 2004/01/28 01:44:44 mickey Exp $ */ +/* $OpenBSD: SYS.h,v 1.2 2004/02/06 18:19:19 deraadt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -47,20 +47,25 @@ #include <sys/syscall.h> #ifdef __STDC__ + #define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall +#define SYSENTRY(x) \ + ENTRY(_thread_sys_ ## x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) #else + #define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall +#define SYSENTRY(x) \ + ENTRY(_thread_sys_/**/x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x) + #endif #define CERROR _C_LABEL(__cerror) #define CURBRK _C_LABEL(__curbrk) -#define SYSENTRY(x) \ - ENTRY(_thread_sys_ ## x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) - - #define _SYSCALL_NOERROR(x,y) \ SYSENTRY(x); \ SYSTRAP(y) diff --git a/lib/libc/arch/x86_64/SYS.h b/lib/libc/arch/x86_64/SYS.h index bdf0bfe6d03..f6364d9553a 100644 --- a/lib/libc/arch/x86_64/SYS.h +++ b/lib/libc/arch/x86_64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.1 2004/01/28 01:44:44 mickey Exp $ */ +/* $OpenBSD: SYS.h,v 1.2 2004/02/06 18:19:19 deraadt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -47,20 +47,25 @@ #include <sys/syscall.h> #ifdef __STDC__ + #define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall +#define SYSENTRY(x) \ + ENTRY(_thread_sys_ ## x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) #else + #define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall +#define SYSENTRY(x) \ + ENTRY(_thread_sys_/**/x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x) + #endif #define CERROR _C_LABEL(__cerror) #define CURBRK _C_LABEL(__curbrk) -#define SYSENTRY(x) \ - ENTRY(_thread_sys_ ## x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) - - #define _SYSCALL_NOERROR(x,y) \ SYSENTRY(x); \ SYSTRAP(y) |