mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
[BZ #4512]
* pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner is detected. * pthread_mutex_timedlock.c: Likewise. * pthread_mutex_trylock.c: Likewise. Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>. * Makefile (tests): Add tst-robust9 and tst-robustpi9. * tst-robust9.c: New file. * tst-robustpi9.c: New file.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -127,6 +127,8 @@ __pthread_mutex_lock (mutex)
|
||||
int newval = id;
|
||||
#ifdef NO_INCR
|
||||
newval |= FUTEX_WAITERS;
|
||||
#else
|
||||
newval |= (oldval & FUTEX_WAITERS);
|
||||
#endif
|
||||
|
||||
newval
|
||||
|
Reference in New Issue
Block a user