summaryrefslogtreecommitdiff
path: root/test/sys/test_pthread.rs
blob: 8928010087a13b1d074f9ad9bf3fd1030e0b11f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use nix::sys::pthread::*;

#[cfg(target_env = "musl")]
#[test]
fn test_pthread_self() {
    let tid = pthread_self();
    assert!(tid != ::std::ptr::null_mut());
}

#[cfg(not(target_env = "musl"))]
#[test]
fn test_pthread_self() {
    let tid = pthread_self();
    assert!(tid != 0);
}