libstdc++-v3/ChangeLog:

        * src/c++20/atomic.cc (__detail::__spin_impl): Do not use
        reserved names for variables.
---

There's no need for reserved names for these entities that are local to
atomic.cc. __spin_impl could be renamed too (it's inside _detail and
inside an anonymous namespace) but this is a smaller localized change
for now.

Tested aarch64-linux. Pushed to trunk.

 libstdc++-v3/src/c++20/atomic.cc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libstdc++-v3/src/c++20/atomic.cc b/libstdc++-v3/src/c++20/atomic.cc
index 2b66793ede7e..8b4d5233bbbf 100644
--- a/libstdc++-v3/src/c++20/atomic.cc
+++ b/libstdc++-v3/src/c++20/atomic.cc
@@ -248,21 +248,21 @@ namespace
     bool _M_track_contention;
   };
 
-  constexpr auto __atomic_spin_count_relax = 12;
-  constexpr auto __atomic_spin_count = 16;
+  constexpr auto atomic_spin_count_relax = 12;
+  constexpr auto atomic_spin_count = 16;
 
-  // This function always returns _M_has_val == true and _M_val == *__addr.
-  // _M_timeout == (*__addr == __args._M_old).
+  // This function always returns _M_has_val == true and _M_val == *addr.
+  // _M_timeout == (*addr == args._M_old).
   __wait_result_type
-  __spin_impl(const __platform_wait_t* __addr, const __wait_args_base& __args)
+  __spin_impl(const __platform_wait_t* addr, const __wait_args_base& args)
   {
     __wait_value_type wval;
-    for (auto __i = 0; __i < __atomic_spin_count; ++__i)
+    for (auto i = 0; i < atomic_spin_count; ++i)
       {
-       wval = __atomic_load_n(__addr, __args._M_order);
-       if (wval != __args._M_old)
+       wval = __atomic_load_n(addr, args._M_order);
+       if (wval != args._M_old)
          return { ._M_val = wval, ._M_has_val = true, ._M_timeout = false };
-       if (__i < __atomic_spin_count_relax)
+       if (i < atomic_spin_count_relax)
          __thread_relax();
        else
          __thread_yield();
-- 
2.52.0

Reply via email to