mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-30 12:31:53 +08:00
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
to force runp->refcntr to be read from memory.
This commit is contained in:
parent
2fdde3b920
commit
af62b44029
@ -1,3 +1,8 @@
|
||||
2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
|
||||
to force runp->refcntr to be read from memory.
|
||||
|
||||
2008-09-18 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #6942]
|
||||
|
@ -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 <drepper@redhat.com>, 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)
|
||||
|
Loading…
Reference in New Issue
Block a user