Skip to content

Commit 0c81536

Browse files
committed
Fix issue in has_acitve_owner in rwlock.h
1 parent a4c3683 commit 0c81536

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)