1 use nix::sys::pthread::*; 2 3 #[cfg(any(target_env = "musl", target_os = "redox"))] 4 #[test] test_pthread_self()5fn 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()12fn test_pthread_self() { 13 let tid = pthread_self(); 14 assert!(tid != 0); 15 } 16