diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/backend/libc/param/auxv.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/backend/libc/param/auxv.rs')
-rw-r--r-- | vendor/rustix/src/backend/libc/param/auxv.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/vendor/rustix/src/backend/libc/param/auxv.rs b/vendor/rustix/src/backend/libc/param/auxv.rs deleted file mode 100644 index 880a1d4..0000000 --- a/vendor/rustix/src/backend/libc/param/auxv.rs +++ /dev/null @@ -1,54 +0,0 @@ -use crate::backend::c; -#[cfg(any( - all(target_os = "android", target_pointer_width = "64"), - target_os = "linux", -))] -use crate::ffi::CStr; - -// `getauxval` wasn't supported in glibc until 2.16. -#[cfg(any( - all(target_os = "android", target_pointer_width = "64"), - target_os = "linux", -))] -weak!(fn getauxval(c::c_ulong) -> *mut c::c_void); - -#[inline] -pub(crate) fn page_size() -> usize { - unsafe { c::sysconf(c::_SC_PAGESIZE) as usize } -} - -#[cfg(not(any(target_os = "vita", target_os = "wasi")))] -#[inline] -pub(crate) fn clock_ticks_per_second() -> u64 { - unsafe { c::sysconf(c::_SC_CLK_TCK) as u64 } -} - -#[cfg(any( - all(target_os = "android", target_pointer_width = "64"), - target_os = "linux", -))] -#[inline] -pub(crate) fn linux_hwcap() -> (usize, usize) { - if let Some(libc_getauxval) = getauxval.get() { - unsafe { - let hwcap = libc_getauxval(c::AT_HWCAP) as usize; - let hwcap2 = libc_getauxval(c::AT_HWCAP2) as usize; - (hwcap, hwcap2) - } - } else { - (0, 0) - } -} - -#[cfg(any( - all(target_os = "android", target_pointer_width = "64"), - target_os = "linux", -))] -#[inline] -pub(crate) fn linux_execfn() -> &'static CStr { - if let Some(libc_getauxval) = getauxval.get() { - unsafe { CStr::from_ptr(libc_getauxval(c::AT_EXECFN).cast()) } - } else { - cstr!("") - } -} |