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

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

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