Skip to content

Commit eaa6cc5

Browse files
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`
1 parent 08c1a6b commit eaa6cc5

File tree

1 file changed

+3
-3
lines changed
  • libc/src/__support/threads/linux

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class RwState {
162162
LIBC_INLINE constexpr bool has_active_reader() const {
163163
return state >= ACTIVE_READER_COUNT_UNIT;
164164
}
165-
LIBC_INLINE constexpr bool has_acitve_owner() const {
165+
LIBC_INLINE constexpr bool has_active_owner() const {
166166
return has_active_reader() || has_active_writer();
167167
}
168168
LIBC_INLINE constexpr bool has_last_reader() const {
@@ -193,7 +193,7 @@ class RwState {
193193
}
194194
__builtin_unreachable();
195195
} else
196-
return !has_acitve_owner();
196+
return !has_active_owner();
197197
}
198198

199199
// This function check if it is possible to grow the reader count without
@@ -548,7 +548,7 @@ class RwLock {
548548
[[nodiscard]]
549549
LIBC_INLINE LockResult check_for_destroy() {
550550
RwState old = RwState::load(state, cpp::MemoryOrder::RELAXED);
551-
if (old.has_acitve_owner())
551+
if (old.has_active_owner())
552552
return LockResult::Busy;
553553
return LockResult::Success;
554554
}

0 commit comments

Comments
 (0)