Restrict mutex static initializer test to Linux
On macOS, libc does not have a static initializer for recursive mutexes
This commit is contained in:
parent
7f6df15aa2
commit
bb06a0cf0e
1 changed files with 5 additions and 2 deletions
|
|
@ -10,10 +10,13 @@ fn main() {
|
|||
{
|
||||
test_mutex_libc_init_recursive();
|
||||
test_mutex_libc_init_normal();
|
||||
test_mutex_libc_static_initializer_recursive();
|
||||
test_rwlock_stdlib();
|
||||
test_rwlock_libc_static_initializer();
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
test_mutex_libc_static_initializer_recursive();
|
||||
}
|
||||
}
|
||||
|
||||
fn test_mutex_stdlib() {
|
||||
|
|
@ -64,7 +67,7 @@ fn test_mutex_libc_init_normal() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_mutex_libc_static_initializer_recursive() {
|
||||
let mutex = std::cell::UnsafeCell::new(libc::PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
|
||||
unsafe {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue