Assert state in sys/unsupported's RwLock::write_unlock.

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Mara Bos 2020-10-09 00:39:03 +02:00 committed by GitHub
parent f4e884288d
commit f1c3edbfab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ impl RWLock {
#[inline]
pub unsafe fn write_unlock(&self) {
self.mode.set(0);
assert_eq!(self.mode.replace(0), -1);
}
#[inline]