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

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

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