diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-26 18:56:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-26 18:56:47 +0200 |
| commit | ceea0be207f8a32b71142e9b5d2a4e9befcbe705 (patch) | |
| tree | 2744cf16f88cb9178b855922dedfb775b4083fc0 /src/libstd/sys/vxworks/process/process_common.rs | |
| parent | 5ffdca77c44f3233abe389890ba73e966d90406d (diff) | |
| parent | 279c399599357cdb40d2bbe24a769d2d1dd4a9d9 (diff) | |
| download | rust-ceea0be207f8a32b71142e9b5d2a4e9befcbe705.tar.gz rust-ceea0be207f8a32b71142e9b5d2a4e9befcbe705.zip | |
Rollup merge of #62862 - BaoshanPang:cleanup, r=alexcrichton
code cleanup remove all codes that are not used by vxWorks
Diffstat (limited to 'src/libstd/sys/vxworks/process/process_common.rs')
| -rw-r--r-- | src/libstd/sys/vxworks/process/process_common.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/libstd/sys/vxworks/process/process_common.rs b/src/libstd/sys/vxworks/process/process_common.rs index db4e80c216c..9fce5f5811f 100644 --- a/src/libstd/sys/vxworks/process/process_common.rs +++ b/src/libstd/sys/vxworks/process/process_common.rs @@ -422,46 +422,12 @@ mod tests { } } - // Android with api less than 21 define sig* functions inline, so it is not - // available for dynamic link. Implementing sigemptyset and sigaddset allow us - // to support older Android version (independent of libc version). - // The following implementations are based on https://git.io/vSkNf - - #[cfg(not(target_os = "android"))] extern { - #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")] fn sigemptyset(set: *mut libc::sigset_t) -> libc::c_int; - - #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")] fn sigaddset(set: *mut libc::sigset_t, signum: libc::c_int) -> libc::c_int; } - #[cfg(target_os = "android")] - unsafe fn sigemptyset(set: *mut libc::sigset_t) -> libc::c_int { - libc::memset(set as *mut _, 0, mem::size_of::<libc::sigset_t>()); - return 0; - } - - #[cfg(target_os = "android")] - unsafe fn sigaddset(set: *mut libc::sigset_t, signum: libc::c_int) -> libc::c_int { - use crate::slice; - - let raw = slice::from_raw_parts_mut(set as *mut u8, mem::size_of::<libc::sigset_t>()); - let bit = (signum - 1) as usize; - raw[bit / 8] |= 1 << (bit % 8); - return 0; - } - - // See #14232 for more information, but it appears that signal delivery to a - // newly spawned process may just be raced in the macOS, so to prevent this - // test from being flaky we ignore it on macOS. #[test] - #[cfg_attr(target_os = "macos", ignore)] - // When run under our current QEMU emulation test suite this test fails, - // although the reason isn't very clear as to why. For now this test is - // ignored there. - #[cfg_attr(target_arch = "arm", ignore)] - #[cfg_attr(target_arch = "aarch64", ignore)] fn test_process_mask() { unsafe { // Test to make sure that a signal mask does not get inherited. |
