rust/tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.rs
2022-07-20 15:54:35 +00:00

11 lines
255 B
Rust

//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {
libc::pthread_rwlock_unlock(rw.get()); //~ ERROR: was not locked
}
}