This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/18138] sem_timedwait should not convert absolute timeout to relative


https://sourceware.org/bugzilla/show_bug.cgi?id=18138

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a9fe4c5aa8e53ee30f7d0a1c878391d5d6324e6e (commit)
      from  afcd9480feca651eef436d8438b783dde5c3bbb2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a9fe4c5aa8e53ee30f7d0a1c878391d5d6324e6e

commit a9fe4c5aa8e53ee30f7d0a1c878391d5d6324e6e
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Mar 25 15:17:54 2015 +0000

    Support six-argument syscalls from C for 32-bit x86, use generic
lowlevellock-futex.h (bug 18138).

    This patch follows the approach outlined in
    <https://sourceware.org/ml/libc-alpha/2015-03/msg00656.html> to
    support six-argument syscalls from INTERNAL_SYSCALL for 32-bit x86,
    making them call a function __libc_do_syscall that takes the syscall
    number and three syscall arguments in the registers in which the
    kernel expects them, along with a pointer to a structure containing
    the other three arguments.

    In turn, this allows the generic lowlevellock-futex.h to be used on
    32-bit x86, so supporting lll_futex_timed_wait_bitset (and so allowing
    FUTEX_CLOCK_REALTIME to be used in various cases, so fixing bug 18138
    for 32-bit x86 and leaving hppa as the only architecture missing
    lll_futex_timed_wait_bitset).  The change to lowlevellock.h's
    definition of SYS_futex is because the generic lowlevelloc-futex.h
    ends up bringing in bits/syscall.h which defines SYS_futex to
    __NR_futex, so resulting in redefinition errors.  The revised
    definition in lowlevellock.h is in line with what the x86_64 version
    does.

    __libc_do_syscall is only needed in libpthread at present (meaning
    nothing special needs to be done to make it shared-only in most
    libraries containing it, static in libc only, as on ARM).

    Tested for 32-bit x86, with the glibc testsuite and with the test in
    bug 18138.  The failures seen

    FAIL: nptl/tst-cleanupx4
    FAIL: rt/tst-cpuclock2

    are pre-existing.

        [BZ #18138]
        * sysdeps/unix/sysv/linux/i386/sysdep.h (struct
        libc_do_syscall_args): New structure.
        (INTERNAL_SYSCALL_MAIN_0): New macro.
        (INTERNAL_SYSCALL_MAIN_1): Likewise.
        (INTERNAL_SYSCALL_MAIN_2): Likewise.
        (INTERNAL_SYSCALL_MAIN_3): Likewise.
        (INTERNAL_SYSCALL_MAIN_4): Likewise.
        (INTERNAL_SYSCALL_MAIN_5): Likewise.
        (INTERNAL_SYSCALL_MAIN_6): Likewise.  Call __libc_do_syscall.
        (INTERNAL_SYSCALL): Define to use INTERNAL_SYSCALL_MAIN_##nr.
        Replace conditional definitions by conditional definitions of ....
        (INTERNAL_SYSCALL_MAIN_INLINE): ... this.  New macro.
        * sysdeps/unix/sysv/linux/i386/libc-do-syscall.S: New file.
        * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = nptl]
        (libpthread-sysdep_routines): Add libc-do-syscall.
        * sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h: Remove file.
        * sysdeps/unix/sysv/linux/i386/lowlevellock.h (SYS_futex): Define
        to __NR_futex not 240.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   22 +++
 sysdeps/unix/sysv/linux/i386/Makefile              |    5 +
 .../i386/{call_pselect6.S => libc-do-syscall.S}    |   44 ++----
 sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h  |  137 --------------------
 sysdeps/unix/sysv/linux/i386/lowlevellock.h        |    2 +-
 sysdeps/unix/sysv/linux/i386/sysdep.h              |   65 +++++++--
 6 files changed, 93 insertions(+), 182 deletions(-)
 copy sysdeps/unix/sysv/linux/i386/{call_pselect6.S => libc-do-syscall.S} (63%)
 delete mode 100644 sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]