From: Paolo Carlini Date: Mon, 4 Sep 2006 08:00:35 +0000 (+0000) Subject: mt_allocator.cc (__pool::_M_reclaim_block): Do not name a variable __used,... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4338a62e0f61177962f0ff361bc679bab91d07d;p=gcc.git mt_allocator.cc (__pool::_M_reclaim_block): Do not name a variable __used, badname on BSD. 2006-09-04 Paolo Carlini * src/mt_allocator.cc (__pool::_M_reclaim_block): Do not name a variable __used, badname on BSD. From-SVN: r116678 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 997e319c886..a1feede7fc4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2006-09-04 Paolo Carlini + + * src/mt_allocator.cc (__pool::_M_reclaim_block): Do + not name a variable __used, badname on BSD. + 2006-09-02 Paolo Carlini Richard Guenther diff --git a/libstdc++-v3/src/mt_allocator.cc b/libstdc++-v3/src/mt_allocator.cc index f0b98bdd019..6b5403dc652 100644 --- a/libstdc++-v3/src/mt_allocator.cc +++ b/libstdc++-v3/src/mt_allocator.cc @@ -275,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _Atomic_word* const __reclaimed_base = reinterpret_cast<_Atomic_word*>(__bin._M_used + __max_threads); const _Atomic_word __reclaimed = __reclaimed_base[__thread_id]; - const size_t __used = __bin._M_used[__thread_id] - __reclaimed; + const size_t __net_used = __bin._M_used[__thread_id] - __reclaimed; // NB: For performance sake we don't resync every time, in order // to spare atomic ops. Note that if __reclaimed increased by, @@ -289,8 +289,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(&__reclaimed_base[__thread_id], -__reclaimed); } - if (__remove >= __used) - __remove -= __used; + if (__remove >= __net_used) + __remove -= __net_used; else __remove = 0; if (__remove > __limit && __remove > __bin._M_free[__thread_id])