]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 18 Dec 2002 11:56:21 +0000 (11:56 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 18 Dec 2002 11:56:21 +0000 (11:56 +0000)
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.

ChangeLog
nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
sysdeps/unix/sysv/linux/i386/brk.c
sysdeps/unix/sysv/linux/i386/mmap.S
sysdeps/unix/sysv/linux/i386/mmap64.S
sysdeps/unix/sysv/linux/i386/sigaction.c
sysdeps/unix/sysv/linux/i386/socket.S
sysdeps/unix/sysv/linux/i386/syscall.S
sysdeps/unix/sysv/linux/i386/sysdep.h

index f9f268f02c58e19e40adb0cd2722f84976a10ef0..af82aba95b9a51765add352d28165d8121b0421b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
 
        * malloc/malloc.c (mALLOPt): Make sure malloc is initialized.
index c8819b243eb903fab3ef362bde375ffbf5fe6d5d..33567460ecd291a6cdc7d8df36eaaac547c02de6 100644 (file)
@@ -1,5 +1,8 @@
 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
+       macro instead of using int $0x80 directly.
+
        * sysdeps/pthread/bits/stdio-lock.h: New file.
        * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
        * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
index 82b9ec8b0c398fdacbb0aaf280663eebf9b36129..9a3cb04d7316c34f05be2bf6db3004bb9876b5c1 100644 (file)
@@ -41,7 +41,7 @@
     PUSHARGS_##args                                                          \
     DOCARGS_##args                                                           \
     movl $SYS_ify (syscall_name), %eax;                                              \
-    int $0x80                                                                \
+    ENTER_KERNEL                                                             \
     POPARGS_##args;                                                          \
     POPCARGS_##args                                                          \
     cmpl $-4095, %eax;                                                       \
index 09af9b9f7e6f47f29aa9d531a83278eb0e980ece..950144d41afa3303e521b7d3440b1ac4d4e88198 100644 (file)
@@ -1,5 +1,5 @@
 /* brk system call for Linux/i386.
-   Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,10 +36,10 @@ __brk (void *addr)
 {
   void *__unbounded newbrk, *__unbounded scratch;
 
-  asm ("movl %%ebx, %1\n"      /* Save %ebx in scratch register.  */
-       "movl %3, %%ebx\n"      /* Put ADDR in %ebx to be syscall arg.  */
-       "int $0x80 # %2\n"      /* Perform the system call.  */
-       "movl %1, %%ebx\n"      /* Restore %ebx from scratch register.  */
+  asm ("movl %%ebx, %1\n\t"    /* Save %ebx in scratch register.  */
+       "movl %3, %%ebx\n\t"    /* Put ADDR in %ebx to be syscall arg.  */
+       ENTER_KERNEL "\n\t"     /* Perform the system call.  */
+       "movl %1, %%ebx"                /* Restore %ebx from scratch register.  */
        : "=a" (newbrk), "=r" (scratch)
        : "0" (SYS_ify (brk)), "g" (__ptrvalue (addr)));
 
index c63a49bcd4435b8133bed45fca1947b77a88a242..ebb21f3d32649e3323c9756f44aced7cb2c2bb15 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995,96,97,98,99,2000,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ ENTRY (__mmap)
        movl $SYS_ify(mmap2), %eax      /* System call number in %eax.  */
 
        /* Do the system call trap.  */
-       int $0x80
+       ENTER_KERNEL
 L(skip):
        /* Restore registers.  */
        popl %edi
index df32998134f79580c018ad0827f565b406d7e867..3a03335814ee980d7da2ab44d2a0938bda6cc922 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995,96,97,98,99,2000,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -65,7 +65,7 @@ ENTRY (BP_SYM (__mmap64))
 
        /* Do the system call trap.  */
 L(do_syscall):
-       int $0x80
+       ENTER_KERNEL
 
        /* Restore registers.  */
        popl %edi
@@ -110,7 +110,7 @@ L(einval):
        lea ADDR-SVRSP(%esp), %ebx      /* Address of args is 1st arg.  */
 
        /* Do the system call trap.  */
-       int $0x80
+       ENTER_KERNEL
 
        /* Restore registers.  */
        movl %edx, %ebx
index 813c9bab773bff003a41ad7633f0c878ab585b0d..bfc8b2c2e27c1ed820533a827c58bd9c7027598e 100644 (file)
@@ -131,9 +131,9 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
       k_newact.sa_restorer = &restore;
     }
 
-  asm volatile ("pushl %%ebx\n"
-               "movl %2, %%ebx\n"
-               "int $0x80\n"
+  asm volatile ("pushl %%ebx\n\t"
+               "movl %2, %%ebx\n\t"
+               ENTER_KERNEL_STR "\n\t"
                "popl %%ebx"
                : "=a" (result)
                : "0" (SYS_ify (sigaction)), "mr" (sig),
index 53f1be61eab25b00f11b54aa347380bcac6f1d72..a5af6b2907685f58d721b492ee28d6fd87e297fa 100644 (file)
@@ -57,7 +57,7 @@ ENTRY (__socket)
        lea 4(%esp), %ecx               /* Address of args is 2nd arg.  */
 
         /* Do the system call trap.  */
-       int $0x80
+       ENTER_KERNEL
 
        /* Restore registers.  */
        movl %edx, %ebx
@@ -89,7 +89,7 @@ L(pseudo_end):
        lea 8(%esp), %ecx               /* Address of args is 2nd arg.  */
 
         /* Do the system call trap.  */
-       int $0x80
+       ENTER_KERNEL
 
        /* Restore registers.  */
        movl %edx, %ebx
index 355be5a58a238f59cee2a7c3a3ff45638f87d1a5..cd7dc65a5f8002273fb493b60ddf10290d6f4671 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ ENTRY (syscall)
        PUSHARGS_5              /* Save register contents.  */
        _DOARGS_5(36)           /* Load arguments.  */
        movl 16(%esp), %eax     /* Load syscall number into %eax.  */
-       int $0x80               /* Do the system call.  */
+       ENTER_KERNEL            /* Do the system call.  */
        POPARGS_5               /* Restore register contents.  */
        cmpl $-4095, %eax       /* Check %eax for error.  */
        jae SYSCALL_ERROR_LABEL /* Jump to error handler if error.  */
index 7bf146e8be4554340ab6f652f14126f96038dfcd..5275ebaf572610cc3fdeb3f08420ec11b1b28526 100644 (file)
@@ -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");                 \