]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 7 Jan 2003 00:49:44 +0000 (00:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 7 Jan 2003 00:49:44 +0000 (00:49 +0000)
2003-01-06  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/alpha/sysdep.h (PSEUDO): Use PSEUDO_PREPARE_ARGS.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Add cancellation
handling.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.

ChangeLog
linuxthreads/ChangeLog
linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
nptl/ChangeLog
sysdeps/unix/alpha/sysdep.h
sysdeps/unix/sysv/linux/alpha/select.S
sysdeps/unix/sysv/linux/alpha/sigsuspend.S

index 0c53dc75b4a4d198fd26ffece35cb412866a329e..daa12bec0859e6fdbb25c97d37377e0339677b4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/alpha/sysdep.h (PSEUDO): Use PSEUDO_PREPARE_ARGS.
+       * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Add cancellation
+       handling.
+       * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
+
 2003-01-06  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
 
        * sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_RET): Add branch hint.
index 5c7b8181e6d6dd592cd96f56790a302140c5a50c..89c771ed533dd31075d618d3e7b03c9c0d631e5e 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
+       PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
+
 2003-01-06  Philip Blundell  <philb@gnu.org>
 
        * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
index ea8fd143ff44ed382a6c26049f4709d19391172f..18ea29c49fc1ad502acbe62fcf992bff981cbe61 100644 (file)
@@ -42,8 +42,9 @@ __LABEL(name)                                                 \
        ldgp    gp, 0(pv);                                      \
        .prologue 1;                                            \
        PSEUDO_PROF;                                            \
+       PSEUDO_PREPARE_ARGS                                     \
        SINGLE_THREAD_P(t0);                                    \
-       beq     t0, $pseudo_cancel;                             \
+       bne     t0, $pseudo_cancel;                             \
        lda     v0, SYS_ify(syscall_name);                      \
        call_pal PAL_callsys;                                   \
        bne     a3, $syscall_error;                             \
index ca298c94a2f200bec6201a89682f5d707ebf7c12..753289261c9c63ee036f3b1a52df8c417b15a805 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
+       * pt-system.c (LIBC_CANCEL_HANDLED): Add.
+       * tst-cancel-wrappers.sh: Remove all exceptions.
+
 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
 
        * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
index f9aba3ffa29b1e3dc716b224c9e9e32bf3afb26d..9dbcb38521b9fd70fa66002586d6f3341b772c75 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -97,6 +97,7 @@
        .ent name,0;                            \
 __LABEL(name)                                  \
        PSEUDO_PROLOGUE;                        \
+       PSEUDO_PREPARE_ARGS                     \
        lda     v0, SYS_ify(syscall_name);      \
        call_pal PAL_callsys;                   \
        bne     a3, __syscall_error !samegp;    \
@@ -109,6 +110,7 @@ __LABEL(name)                                       \
        .align 4;                               \
        .ent name,0;                            \
 __LABEL(name)                                  \
+       PSEUDO_PREPARE_ARGS                     \
        lda     v0, SYS_ify(syscall_name);      \
        call_pal PAL_callsys;                   \
        bne     a3, 1996f;                      \
@@ -122,6 +124,9 @@ __LABEL(name)                                       \
        END(sym)
 #endif /* PIC && !RTLD_PRIVATE_ERRNO */
 
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS    /* Nothing.  */
+
 #define r0     v0
 #define r1     a4
 
index 7d5282d6215982e82bf1a0d33e26b100875000e4..9cfd63ff93736e89a49ad2efb6c4dd0ad83be198 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002, 2003 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
@@ -16,7 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 #define _ERRNO_H        1
 #include <bits/errno.h>
 
@@ -49,12 +49,20 @@ LEAF(SELECT, 64)
 #endif
        .prologue 1
 
+#ifdef CENABLE
+       SINGLE_THREAD_P (t1)
+#else
        ldl     t0, __libc_missing_axp_tv64
+#endif
 
        /* Save timeout early, since we'll need to recover this after 
           the system call.  */
        stq     a4, 48(sp)
 
+#ifdef CENABLE
+       bne     t1, $do_cancel
+#endif
+
        bne     t0, $do32
 
        /* Save arguments in case we do need to fall back.  */
@@ -109,6 +117,93 @@ $do32:
 2:     addq    sp, 64, sp
        ret
 
+#ifdef CENABLE
+       .align  3
+$do_cancel:
+       /* Save arguments.  */
+       stq     a0, 8(sp)
+       stq     a1, 16(sp)
+       stq     a2, 24(sp)
+       stq     a3, 32(sp)
+       stq     ra, 40(sp)
+
+       CENABLE
+
+       ldl     t0, __libc_missing_axp_tv64
+       bne     t0, $do_cancel32
+
+       /* Recover the saved arguments.  */
+       ldq     a4, 48(sp)
+       ldq     a3, 32(sp)
+       ldq     a2, 24(sp)
+       ldq     a1, 16(sp)
+       ldq     a0, 8(sp)
+
+       ldi     v0, SYS_ify(select)
+       callsys
+       bne     a3, $cancel_err64
+
+       stq     v0, 8(sp)
+       CDISABLE
+       ldq     v0, 8(sp)
+       ldq     ra, 40(sp)
+
+       /* Everything ok.  */
+       addq    sp, 64, sp
+       ret
+
+       /* If we didn't get ENOSYS, it is a real error.  */
+       .align 3
+$cancel_err64:
+       cmpeq   v0, ENOSYS, t0
+       beq     t0, $cancel_error
+       stl     t0, __libc_missing_axp_tv64
+
+       /* Recover the saved arguments.  */
+       .align 3
+$do_cancel32:
+       ldq     a4, 48(sp)
+       ldq     a3, 32(sp)
+       ldq     a2, 24(sp)
+       ldq     a1, 16(sp)
+       ldq     a0, 8(sp)
+
+       /* If the timeout argument is present bounce to the smaller fmt.  */
+       beq     a4, 1f
+       ldq     t0, 0(a4)
+       ldq     t1, 8(a4)
+       stl     t0, 0(sp)
+       stl     t1, 4(sp)
+       mov     sp, a4
+
+1:     ldi     v0, SYS_ify(osf_select)
+       callsys
+       bne     a3, $cancel_error
+
+       /* ... and bounce the remaining timeout back.  */
+       ldq     a4, 48(sp)
+       beq     a4, 2f
+       ldl     t0, 0(sp)
+       ldl     t1, 4(sp)
+       stq     t0, 0(a4)
+       stq     t1, 8(a4)
+
+2:     stq     v0, 8(sp)
+       CDISABLE
+       ldq     v0, 8(sp)
+       ldq     ra, 40(sp)
+
+       addq    sp, 64, sp
+       ret
+
+       .align 3
+$cancel_error:
+       stq     v0, 8(sp)
+       CDISABLE
+       ldq     v0, 8(sp)
+       ldq     ra, 40(sp)
+#endif
+
        .align 3
 $error:
        addq    sp, 64, sp
index e0f18c26b4d6e4482eb35e0ed1775f5f10ae9bdd..e5de55faebddef1f8768575d4885b8f0c3664525 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
 
 /* sigsuspend is a special syscall since it needs to dereference the
    sigset.  This will have to change when we have more than 64 signals.  */
 
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 
-       .text
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS    ldq     a0, 0(a0);
 
-LEAF(__sigsuspend, 0)
-#ifdef PROF
-       ldgp    gp, 0(pv)
-       .set noat
-       lda     AT, _mcount
-       jsr     AT, (AT), _mcount
-       .set at
-       .prologue 1
-#else
-       .prologue 0
-#endif
-
-       ldq     a0, 0(a0)
-       ldi     v0, __NR_sigsuspend
-       call_pal PAL_callsys
-       bne     a3, error
+PSEUDO(__sigsuspend, sigsuspend, 1)
        ret
-
-error:
-#ifndef PROF
-       br      gp, 1f
-1:     ldgp    gp, 0(gp)
-#endif
-       SYSCALL_ERROR_HANDLER
-
-       END(__sigsuspend)
-
+PSEUDO_END(__sigsuspend)
 libc_hidden_def (__sigsuspend)
 weak_alias(__sigsuspend, sigsuspend)
 strong_alias (__sigsuspend, __libc_sigsuspend)