diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-07-01 08:31:38 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-07-01 08:31:38 +0000 |
commit | b5d5b67be3e624efa7f44df4375dfdfffa1f97cb (patch) | |
tree | c3ba187098d3aa88a83200ab4a5c4c384abc9124 /malloc/arena.c | |
parent | 96c814d3d866eff5a86599cbe567ca167189c7ea (diff) | |
download | glibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.tar.gz glibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.tar.xz glibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.zip |
Update.
2003-05-04 H.J. Lu <hongjiu.lu@intel.com> * malloc/arena.c (arena_get2): Add atomic_write_barrier. * malloc/thread-m.h: Include <atomic.h>. (atomic_full_barrier): Provide default. (atomic_read_barrier): Likewise. (atomic_write_barrier): Likewise. * sysdeps/ia64/bits/atomic.h (atomic_full_barrier): New #define.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r-- | malloc/arena.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index e47d3d0e1f..fb7b92f318 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -1,5 +1,5 @@ /* Malloc implementation for multiple threads without lock contention. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Wolfram Gloger <wg@malloc.de>, 2001. @@ -758,6 +758,7 @@ arena_get2(a_tsd, size) mstate a_tsd; size_t size; /* Add the new arena to the global list. */ (void)mutex_lock(&list_lock); a->next = main_arena.next; + atomic_write_barrier (); main_arena.next = a; (void)mutex_unlock(&list_lock); |