mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
kernel/lock: Remove ASSERT_UNLOCKED_RW_LOCK from _rw_lock_read_lock.
It's valid to read-lock the same rwlock twice, of course. (Only affects KDEBUG_RW_LOCK_DEBUG builds, the assertions do nothing on any other.)
This commit is contained in:
parent
dd45194d37
commit
13a5c7f91f
@ -512,7 +512,6 @@ _rw_lock_read_lock(rw_lock* lock)
|
||||
#if KDEBUG_RW_LOCK_DEBUG
|
||||
int32 oldCount = atomic_add(&lock->count, 1);
|
||||
if (oldCount < RW_LOCK_WRITER_COUNT_BASE) {
|
||||
ASSERT_UNLOCKED_RW_LOCK(lock);
|
||||
_rw_lock_set_read_locked(lock);
|
||||
return B_OK;
|
||||
}
|
||||
@ -526,8 +525,6 @@ _rw_lock_read_lock(rw_lock* lock)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
ASSERT_UNLOCKED_RW_LOCK(lock);
|
||||
|
||||
// The writer that originally had the lock when we called atomic_add() might
|
||||
// already have gone and another writer could have overtaken us. In this
|
||||
// case the original writer set pending_readers, so we know that we don't
|
||||
|
Loading…
Reference in New Issue
Block a user