1use nix::sys::pthread::*;
2
3#[cfg(any(target_env = "musl", target_os = "redox"))]
4#[test]
5fn test_pthread_self() {
6 let tid = pthread_self();
7 assert!(!tid.is_null());
8}
9
10#[cfg(not(any(target_env = "musl", target_os = "redox")))]
11#[test]
12fn test_pthread_self() {
13 let tid = pthread_self();
14 assert_ne!(tid, 0);
15}
16
17#[test]
18#[cfg(not(target_os = "redox"))]
19fn test_pthread_kill_none() {
20 pthread_kill(pthread_self(), None)
21 .expect("Should be able to send signal to my thread.");
22}
23