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