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