Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
22
third-party/vendor/nix-0.24.3/test/sys/test_pthread.rs
vendored
Normal file
22
third-party/vendor/nix-0.24.3/test/sys/test_pthread.rs
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
use nix::sys::pthread::*;
|
||||
|
||||
#[cfg(any(target_env = "musl", target_os = "redox"))]
|
||||
#[test]
|
||||
fn test_pthread_self() {
|
||||
let tid = pthread_self();
|
||||
assert!(tid != ::std::ptr::null_mut());
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_env = "musl", target_os = "redox")))]
|
||||
#[test]
|
||||
fn test_pthread_self() {
|
||||
let tid = pthread_self();
|
||||
assert!(tid != 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_os = "redox"))]
|
||||
fn test_pthread_kill_none() {
|
||||
pthread_kill(pthread_self(), None)
|
||||
.expect("Should be able to send signal to my thread.");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue