summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/sysdep.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-18 11:56:21 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-18 11:56:21 +0000
commitf051627fadac5986cb21829c1083a819d4310489 (patch)
treef6d0a6c8fa57b4fd523c58bd184beb7a3ebd6459 /sysdeps/unix/sysv/linux/i386/sysdep.h
parentd7913e0e256e842a3ff43b1a0854b351f585645d (diff)
downloadglibc-f051627fadac5986cb21829c1083a819d4310489.tar.gz
Update.
2002-12-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/sysdep.h: Define ENTER_KERNEL macro. Use it instead of directly int $0x80. * sysdeps/unix/sysv/linux/i386/brk.c: Use ENTER_KERNEL. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/socket.S: Likewise. * sysdeps/unix/sysv/linux/i386/syscall.S: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 7bf146e8be..5275ebaf57 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -159,6 +159,11 @@ __i686.get_pc_thunk.reg: \
# endif /* _LIBC_REENTRANT */
#endif /* PIC */
+
+/* The original calling convention for system calls on Linux/i386 is
+ to use int $0x80. */
+#define ENTER_KERNEL int $0x80
+
/* Linux takes system call arguments in registers:
syscall number %eax call-clobbered
@@ -208,7 +213,7 @@ __i686.get_pc_thunk.reg: \
PUSHARGS_##args \
DOARGS_##args \
movl $SYS_ify (syscall_name), %eax; \
- int $0x80 \
+ ENTER_KERNEL \
POPARGS_##args
#define PUSHARGS_0 /* No arguments to push. */
@@ -255,6 +260,10 @@ __i686.get_pc_thunk.reg: \
#else /* !__ASSEMBLER__ */
+/* The original calling convention for system calls on Linux/i386 is
+ to use int $0x80. */
+#define ENTER_KERNEL "int $0x80"
+
/* We need some help from the assembler to generate optimal code. We
define some macros here which later will be used. */
asm (".L__X'%ebx = 1\n\t"
@@ -315,7 +324,7 @@ asm (".L__X'%ebx = 1\n\t"
asm volatile ( \
LOADARGS_##nr \
"movl %1, %%eax\n\t" \
- "int $0x80\n\t" \
+ ENTER_KERNEL "\n\t" \
RESTOREARGS_##nr \
: "=a" (resultvar) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \