We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa8fe4e commit a6e874aCopy full SHA for a6e874a
libc/src/__support/threads/linux/rwlock.h
@@ -370,8 +370,9 @@ class RwLock {
370
public:
371
LIBC_INLINE constexpr RwLock(Role preference = Role::Reader,
372
bool is_pshared = false)
373
- : is_pshared(is_pshared), preference(static_cast<unsigned>(preference)),
374
- state(0), writer_tid(0), queue() {}
+ : is_pshared(is_pshared),
+ preference(static_cast<unsigned>(preference) & 1u), state(0),
375
+ writer_tid(0), queue() {}
376
377
[[nodiscard]]
378
LIBC_INLINE LockResult try_read_lock() {
0 commit comments