Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Oct 27, 2023
1 parent 9d3c6ef commit 3995215
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/pass-dep/shims/pthreads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fn main() {
test_mutex_libc_static_initializer_recursive();
}

#[cfg(not(target_os = "freebsd"))]
fn test_mutex_libc_init_recursive() {
unsafe {
let mut attr: libc::pthread_mutexattr_t = std::mem::zeroed();
Expand Down Expand Up @@ -106,6 +107,7 @@ fn test_mutex_libc_static_initializer_recursive() {
// Testing the behavior of std::sync::RwLock does not fully exercise the pthread rwlock shims, we
// need to go a layer deeper and test the behavior of the libc functions, because
// std::sys::unix::rwlock::RWLock itself keeps track of write_locked and num_readers.
#[cfg(not(target_os = "freebsd"))]
fn test_rwlock_libc_static_initializer() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {
Expand Down

0 comments on commit 3995215

Please sign in to comment.