blob: 2704ff154413cdda5e30a82d7ca86ad693ef41da [file] [log] [blame]
//@ignore-target-windows: No pthreads on Windows
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {
assert_eq!(libc::pthread_rwlock_wrlock(rw.get()), 0);
libc::pthread_rwlock_wrlock(rw.get()); //~ ERROR: deadlock
}
}