[libc-commits] [libc] eaa6cc5 - Fixes #118231: Corrected spelling mistake in has_acitive_owner function (#118266)

via libc-commits libc-commits at lists.llvm.org
Mon Dec 2 00:10:29 PST 2024


Author: Shankhin
Date: 2024-12-02T16:10:25+08:00
New Revision: eaa6cc547e7300b122efbbaf8940ee9d15f7964c

URL: https://github.com/llvm/llvm-project/commit/eaa6cc547e7300b122efbbaf8940ee9d15f7964c
DIFF: https://github.com/llvm/llvm-project/commit/eaa6cc547e7300b122efbbaf8940ee9d15f7964c.diff

LOG: Fixes #118231: Corrected spelling mistake in has_acitive_owner function (#118266)

Fixes #118231 
- Updated the method name to `has_active_owner` in
`llvm-project/libc/src/__support/threads/linux/rwlock.h`
- Verified usage and updated all references to the method.
- Ran tests:
    - `check-llvm-unit`
    - `check-all`

Added: 
    

Modified: 
    libc/src/__support/threads/linux/rwlock.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/threads/linux/rwlock.h b/libc/src/__support/threads/linux/rwlock.h
index 57fcc7bb67a6a0..f7aeb5b709aa3e 100644
--- a/libc/src/__support/threads/linux/rwlock.h
+++ b/libc/src/__support/threads/linux/rwlock.h
@@ -162,7 +162,7 @@ class RwState {
   LIBC_INLINE constexpr bool has_active_reader() const {
     return state >= ACTIVE_READER_COUNT_UNIT;
   }
-  LIBC_INLINE constexpr bool has_acitve_owner() const {
+  LIBC_INLINE constexpr bool has_active_owner() const {
     return has_active_reader() || has_active_writer();
   }
   LIBC_INLINE constexpr bool has_last_reader() const {
@@ -193,7 +193,7 @@ class RwState {
       }
       __builtin_unreachable();
     } else
-      return !has_acitve_owner();
+      return !has_active_owner();
   }
 
   // This function check if it is possible to grow the reader count without
@@ -548,7 +548,7 @@ class RwLock {
   [[nodiscard]]
   LIBC_INLINE LockResult check_for_destroy() {
     RwState old = RwState::load(state, cpp::MemoryOrder::RELAXED);
-    if (old.has_acitve_owner())
+    if (old.has_active_owner())
       return LockResult::Busy;
     return LockResult::Success;
   }


        


More information about the libc-commits mailing list