From 6d8225fe1a3277273c245ceb1b35fd536300f649 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 20 Oct 2008 07:21:57 +0000 Subject: Updated to fedora-glibc-20081019T1815 --- nptl/ChangeLog | 12 ++++++++++++ nptl/sysdeps/unix/sysv/linux/fork.c | 5 ++++- nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 19 ++++++++++--------- 3 files changed, 26 insertions(+), 10 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 15ee177611..af0d0c1d0c 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,15 @@ +2008-09-11 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier + to force runp->refcntr to be read from memory. + +2008-09-08 Richard Guenther + + * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock, + lll_robust_lock, lll_cond_lock, lll_robust_cond_lock, + lll_timedlock, lll_robust_timedlock, lll_unlock, + lll_robust_unlock): Promote private to int. + 2008-08-15 Ulrich Drepper * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c index 1683de80fd..524d72c587 100644 --- a/nptl/sysdeps/unix/sysv/linux/fork.c +++ b/nptl/sysdeps/unix/sysv/linux/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -64,6 +64,9 @@ __libc_fork (void) struct fork_handler *runp; while ((runp = __fork_handlers) != NULL) { + /* Make sure we read from the current RUNP pointer. */ + atomic_full_barrier (); + unsigned int oldval = runp->refcntr; if (oldval == 0) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 8f67616af7..d53559c074 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -323,7 +323,7 @@ LLL_STUB_UNWIND_INFO_END "=m" (futex), "=&d" (ignore3) \ : "1" (1), "m" (futex), \ "i" (MULTIPLE_THREADS_OFFSET), "0" (0), \ - "g" (private) \ + "g" ((int) (private)) \ : "memory"); \ } \ }) @@ -345,7 +345,7 @@ LLL_STUB_UNWIND_INFO_END "18:" \ : "=a" (result), "=c" (ignore1), "=m" (futex), \ "=&d" (ignore2) \ - : "0" (0), "1" (id), "m" (futex), "g" (private) \ + : "0" (0), "1" (id), "m" (futex), "g" ((int) (private))\ : "memory"); \ result; }) @@ -370,7 +370,7 @@ LLL_STUB_UNWIND_INFO_END "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex), \ "=&d" (ignore3) \ - : "0" (0), "1" (2), "m" (futex), "g" (private) \ + : "0" (0), "1" (2), "m" (futex), "g" ((int) (private))\ : "memory"); \ }) @@ -393,7 +393,7 @@ LLL_STUB_UNWIND_INFO_END : "=a" (result), "=c" (ignore1), "=m" (futex), \ "=&d" (ignore2) \ : "0" (0), "1" (id | FUTEX_WAITERS), "m" (futex), \ - "g" (private) \ + "g" ((int) (private)) \ : "memory"); \ result; }) @@ -416,7 +416,7 @@ LLL_STUB_UNWIND_INFO_END : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex), "=S" (ignore3) \ : "0" (0), "1" (1), "m" (futex), "m" (timeout), \ - "4" (private) \ + "4" ((int) (private)) \ : "memory"); \ result; }) @@ -439,7 +439,7 @@ LLL_STUB_UNWIND_INFO_END : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex), "=S" (ignore3) \ : "0" (0), "1" (id), "m" (futex), "m" (timeout), \ - "4" (private) \ + "4" ((int) (private)) \ : "memory"); \ result; }) @@ -489,7 +489,7 @@ LLL_STUB_UNWIND_INFO_END "18:" \ : "=m" (futex), "=&a" (ignore), "=&c" (ignore2) \ : "i" (MULTIPLE_THREADS_OFFSET), "m" (futex), \ - "g" (private) \ + "g" ((int) (private)) \ : "memory"); \ } \ }) @@ -511,7 +511,8 @@ LLL_STUB_UNWIND_INFO_END LLL_STUB_UNWIND_INFO_4 \ "18:" \ : "=m" (futex), "=&a" (ignore), "=&c" (ignore2) \ - : "i" (FUTEX_WAITERS), "m" (futex), "g" (private) \ + : "i" (FUTEX_WAITERS), "m" (futex), \ + "g" ((int) (private)) \ : "memory"); \ }) -- cgit v1.2.3