]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Invalid timeouts in SH sem_timedwait.
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 8 Mar 2012 09:45:05 +0000 (10:45 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Thu, 8 Mar 2012 09:45:05 +0000 (10:45 +0100)
We adjusted nwaiters even though this isn't necessary.

nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S

index 6cf6b3fed9f29726de94a3c6ce8d73e8f45d95a2..cd70329abb2b7315e1dcb30ad3a2fb523638539d 100644 (file)
@@ -1,5 +1,8 @@
 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
 
+       * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
+       updating nwaiters.
+
        * tst-sem13.c (do_test): Add another test case.
        * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
        Fix updating nwaiters.
index d47362fc6838c493bb1f69bfa4c309953bfd21c9..c26e5aa4cb8f821a7f5a69d7ba9d648ba9b72dd5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 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
@@ -69,8 +69,8 @@ sem_timedwait:
        mov.l   @(4,r9), r0
        mov.l   .L1g, r1
        cmp/hs  r1, r0
-       bt/s    6f
-        mov    #EINVAL, r0
+       bt/s    .Lerrno_exit
+        mov    #EINVAL, r10
        INC (@(NWAITERS,r8),r2)
 
 7:
@@ -168,6 +168,8 @@ sem_timedwait:
        neg     r0, r0
 6:
        mov     r0, r10
+       DEC (@(NWAITERS,r8), r2)
+.Lerrno_exit:
        mova    .Lgot2, r0
        mov.l   .Lgot2, r12
        add     r0, r12
@@ -182,7 +184,6 @@ sem_timedwait:
        .long   errno@GOTTPOFF
 .Lexit:
        mov.l   r10, @r0
-       DEC (@(NWAITERS,r8), r2)
        bra     10b
         mov    #-1, r0