diff --git a/.github/.cspell/project-dictionary.txt b/.github/.cspell/project-dictionary.txt index b5bf56f33..70c2514db 100644 --- a/.github/.cspell/project-dictionary.txt +++ b/.github/.cspell/project-dictionary.txt @@ -3,6 +3,7 @@ adde alcgr algr allnoconfig +amocas aosp aqrl armasm @@ -175,4 +176,6 @@ xmmword xsave xsub zaamo +zabha +zacas Zhaoxin diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2be80454..44336b053 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,6 +231,8 @@ jobs: target: riscv32gc-unknown-linux-gnu - rust: '1.59' target: riscv64gc-unknown-linux-gnu + - rust: '1.73' # LLVM 17 (oldest version we can use experimental-zacas on this target) + target: riscv64gc-unknown-linux-gnu - rust: stable target: riscv64gc-unknown-linux-gnu - rust: nightly @@ -354,6 +356,13 @@ jobs: RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-cpu=pwr8 RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-cpu=pwr8 if: startsWith(matrix.target, 'powerpc64-') + # riscv64 +experimental-zacas + - run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-} + env: + RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+experimental-zacas + RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+experimental-zacas + # TODO: cranelift doesn't support cfg(target_feature): /~https://github.com/rust-lang/rustc_codegen_cranelift/issues/1400 + if: startsWith(matrix.target, 'riscv64') && !contains(matrix.flags, 'codegen-backend=cranelift') # s390x z196 (arch9) - run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-} env: diff --git a/build.rs b/build.rs index 923a91f49..146ea4f2d 100644 --- a/build.rs +++ b/build.rs @@ -47,7 +47,7 @@ fn main() { if version.minor >= 80 { println!( - r#"cargo:rustc-check-cfg=cfg(target_feature,values("zaamo","quadword-atomics","fast-serialization","load-store-on-cond","distinct-ops","miscellaneous-extensions-3"))"# + r#"cargo:rustc-check-cfg=cfg(target_feature,values("zaamo","experimental-zacas","quadword-atomics","fast-serialization","load-store-on-cond","distinct-ops","miscellaneous-extensions-3"))"# ); // Custom cfgs set by build script. Not public API. @@ -58,7 +58,7 @@ fn main() { // TODO: handle multi-line target_feature_fallback // grep -E 'target_feature_fallback\("' build.rs | sed -E 's/^.*target_feature_fallback\(//; s/",.*$/"/' | LC_ALL=C sort -u | tr '\n' ',' println!( - r#"cargo:rustc-check-cfg=cfg(portable_atomic_target_feature,values("cmpxchg16b","distinct-ops","fast-serialization","load-store-on-cond","lse","lse128","lse2","mclass","miscellaneous-extensions-3","quadword-atomics","rcpc3","v6","zaamo"))"# + r#"cargo:rustc-check-cfg=cfg(portable_atomic_target_feature,values("cmpxchg16b","distinct-ops","fast-serialization","load-store-on-cond","lse","lse128","lse2","mclass","miscellaneous-extensions-3","quadword-atomics","rcpc3","v6","zaamo","experimental-zacas"))"# ); } @@ -310,9 +310,20 @@ fn main() { } } "riscv32" | "riscv64" => { - // As of rustc 1.80, target_feature "zaamo" is not available on rustc side: + // As of rustc 1.80, target_feature "zaamo"/"zacas" is not available on rustc side: // /~https://github.com/rust-lang/rust/blob/1.80.0/compiler/rustc_target/src/target_features.rs#L273 - target_feature_fallback("zaamo", false); // amo*.{w,d} + // zacas and zabha implies zaamo on GCC, but do not on LLVM. + // /~https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0-rc3/llvm/lib/TargetParser/RISCVISAInfo.cpp#L774 + // /~https://github.com/gcc-mirror/gcc/blob/08693e29ec186fd7941d0b73d4d466388971fe2f/gcc/config/riscv/arch-canonicalize#L45-L46 + if version.llvm >= 17 { + // amocas.{w,d,q} (amocas.{b,h} if zabha is also available) + // available as experimental since 17 /~https://github.com/llvm/llvm-project/commit/29f630a1ddcbb03caa31b5002f0cbc105ff3a869 + // attempted to make non-experimental in 19 /~https://github.com/llvm/llvm-project/commit/95aab69c109adf29e183090c25dc95c773215746 + // but reverted in /~https://github.com/llvm/llvm-project/commit/70e7d26e560173c8b9db4c75ab4a3004cd5f021a + target_feature_fallback("experimental-zacas", false); + } + // amo*.{w,d} + target_feature_fallback("zaamo", false); } "powerpc64" => { // For Miri and ThreadSanitizer. diff --git a/src/cfgs.rs b/src/cfgs.rs index afb72503e..b90ce262c 100644 --- a/src/cfgs.rs +++ b/src/cfgs.rs @@ -241,6 +241,35 @@ mod atomic_64_macros { ), ), ), + all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + // TODO(riscv64) + // all( + // feature = "fallback", + // not(portable_atomic_no_outline_atomics), + // any(test, portable_atomic_outline_atomics), // TODO(riscv64): currently disabled by default + // any( + // all( + // target_os = "linux", + // any( + // target_env = "gnu", + // all( + // any(target_env = "musl", target_env = "ohos"), + // not(target_feature = "crt-static"), + // ), + // portable_atomic_outline_atomics, + // ), + // ), + // target_os = "android", + // ), + // not(any(miri, portable_atomic_sanitize_thread)), + // ), + ), + ), all( target_arch = "powerpc64", portable_atomic_unstable_asm_experimental_arch, @@ -331,6 +360,35 @@ mod atomic_128_macros { ), ), ), + all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + // TODO(riscv64) + // all( + // feature = "fallback", + // not(portable_atomic_no_outline_atomics), + // any(test, portable_atomic_outline_atomics), // TODO(riscv64): currently disabled by default + // any( + // all( + // target_os = "linux", + // any( + // target_env = "gnu", + // all( + // any(target_env = "musl", target_env = "ohos"), + // not(target_feature = "crt-static"), + // ), + // portable_atomic_outline_atomics, + // ), + // ), + // target_os = "android", + // ), + // not(any(miri, portable_atomic_sanitize_thread)), + // ), + ), + ), all( target_arch = "powerpc64", portable_atomic_unstable_asm_experimental_arch, diff --git a/src/imp/atomic128/README.md b/src/imp/atomic128/README.md index d93cad305..27780af00 100644 --- a/src/imp/atomic128/README.md +++ b/src/imp/atomic128/README.md @@ -8,6 +8,7 @@ Here is the table of targets that support 128-bit atomics and the instructions u | ----------- | ---- | ----- | --- | --- | ---- | | x86_64 | cmpxchg16b or vmovdqa | cmpxchg16b or vmovdqa | cmpxchg16b | cmpxchg16b | cmpxchg16b target feature required. vmovdqa requires Intel, AMD, or Zhaoxin CPU with AVX.
Both compile-time and run-time detection are supported for cmpxchg16b. vmovdqa is currently run-time detection only.
Requires rustc 1.59+ | | aarch64 | ldxp/stxp or casp or ldp/ldiapp | ldxp/stxp or casp or stp/stilp/swpp | ldxp/stxp or casp | ldxp/stxp or casp/swpp/ldclrp/ldsetp | casp requires lse target feature, ldp/stp requires lse2 target feature, ldiapp/stilp requires lse2 and rcpc3 target features, swpp/ldclrp/ldsetp requires lse128 target feature.
Both compile-time and run-time detection are supported for lse and lse2. Others are currently compile-time detection only.
Requires rustc 1.59+ | +| riscv64 | amocas.q | amocas.q | amocas.q | amocas.q | Requires experimental-zacas target feature. Currently compile-time detection only due to LLVM marking it as experimental.
Requires 1.73+ (LLVM 17+) | | powerpc64 | lq | stq | lqarx/stqcx. | lqarx/stqcx. | Requires target-cpu pwr8+ (powerpc64le is pwr8 by default). Both compile-time and run-time detection are supported (run-time detection is currently disabled by default).
Requires nightly | | s390x | lpq | stpq | cdsg | cdsg | Requires nightly | @@ -17,7 +18,7 @@ See [aarch64.rs](aarch64.rs) module-level comments for more details on the instr ## Comparison with core::intrinsics::atomic_\* (core::sync::atomic::Atomic{I,U}128) -This directory has target-specific implementations with inline assembly ([aarch64.rs](aarch64.rs), [x86_64.rs](x86_64.rs), [powerpc64.rs](powerpc64.rs), [s390x.rs](s390x.rs)) and an implementation without inline assembly ([intrinsics.rs](intrinsics.rs)). The latter currently always needs nightly compilers and is only used for Miri and ThreadSanitizer, which do not support inline assembly. +This directory has target-specific implementations with inline assembly ([aarch64.rs](aarch64.rs), [x86_64.rs](x86_64.rs), [powerpc64.rs](powerpc64.rs), [riscv64.rs](riscv64.rs), [s390x.rs](s390x.rs)) and an implementation without inline assembly ([intrinsics.rs](intrinsics.rs)). The latter currently always needs nightly compilers and is only used for Miri and ThreadSanitizer, which do not support inline assembly. Implementations with inline assembly generate assemblies almost equivalent to the `core::intrinsics::atomic_*` (used in `core::sync::atomic::Atomic{I,U}128`) for many operations, but some operations may or may not generate more efficient code. For example: @@ -45,6 +46,7 @@ Here is the table of targets that support run-time CPU feature detection and the | aarch64 | macos | sysctl | all | Currently only used in tests because FEAT_LSE and FEAT_LSE2 are always available at compile-time. | | aarch64 | windows | IsProcessorFeaturePresent | lse | Enabled by default | | aarch64 | fuchsia | zx_system_get_features | lse | Enabled by default | +| riscv64 | linux | riscv_hwprobe | all | Currently only used in tests due to LLVM marking zacas as experimental | | powerpc64 | linux | getauxval | all | Disabled by default | | powerpc64 | freebsd | elf_aux_info | all | Disabled by default | | powerpc64 | openbsd | elf_aux_info | all | Disabled by default | diff --git a/src/imp/atomic128/detect/common.rs b/src/imp/atomic128/detect/common.rs index 81fef27f7..f192b7c9a 100644 --- a/src/imp/atomic128/detect/common.rs +++ b/src/imp/atomic128/detect/common.rs @@ -103,6 +103,24 @@ impl CpuInfo { } } +#[cfg(target_arch = "riscv64")] +impl CpuInfo { + // NB: update test_bit_flags test when adding new flag. + const HAS_ZACAS: u32 = 1; // amocas.{w,d,q} + + #[cfg(any( + test, + not(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" + )) + ))] + #[inline] + pub(crate) fn has_zacas(self) -> bool { + self.test(CpuInfo::HAS_ZACAS) + } +} + #[cfg(target_arch = "powerpc64")] impl CpuInfo { // NB: update test_bit_flags test when adding new flag. @@ -122,7 +140,7 @@ impl CpuInfo { } // core::ffi::c_* (except c_void) requires Rust 1.64, libc will soon require Rust 1.47 -#[cfg(any(target_arch = "aarch64", target_arch = "powerpc64"))] +#[cfg(any(target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64"))] #[cfg(not(windows))] #[allow(dead_code, non_camel_case_types)] mod c_types { @@ -216,6 +234,8 @@ mod tests_common { ]); #[cfg(target_arch = "x86_64")] test_flags(&[CpuInfo::INIT, CpuInfo::HAS_CMPXCHG16B, CpuInfo::HAS_VMOVDQA_ATOMIC]); + #[cfg(target_arch = "riscv64")] + test_flags(&[CpuInfo::INIT, CpuInfo::HAS_ZACAS]); #[cfg(target_arch = "powerpc64")] test_flags(&[CpuInfo::INIT, CpuInfo::HAS_QUADWORD_ATOMICS]); } @@ -265,6 +285,19 @@ mod tests_common { )), ); } + #[cfg(target_arch = "riscv64")] + { + features.push_str("run-time:\n"); + print_feature!("zacas", detect().test(CpuInfo::HAS_ZACAS)); + features.push_str("compile-time:\n"); + print_feature!( + "zacas", + cfg!(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" + )), + ); + } #[cfg(target_arch = "powerpc64")] { features.push_str("run-time:\n"); @@ -339,6 +372,16 @@ mod tests_common { assert!(!detect().test(CpuInfo::HAS_RCPC3)); } } + #[cfg(target_arch = "riscv64")] + #[test] + #[cfg_attr(portable_atomic_test_outline_atomics_detect_false, ignore)] + fn test_detect() { + if detect().has_zacas() { + assert!(detect().test(CpuInfo::HAS_ZACAS)); + } else { + assert!(!detect().test(CpuInfo::HAS_ZACAS)); + } + } #[cfg(target_arch = "powerpc64")] #[test] #[cfg_attr(portable_atomic_test_outline_atomics_detect_false, ignore)] diff --git a/src/imp/atomic128/detect/riscv64_linux.rs b/src/imp/atomic128/detect/riscv64_linux.rs new file mode 100644 index 000000000..8cde84c07 --- /dev/null +++ b/src/imp/atomic128/detect/riscv64_linux.rs @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +// Run-time CPU feature detection on riscv64 Linux/Android by using riscv_hwprobe. +// +// On RISC-V, detection using auxv only supports single-character extensions. +// +// Refs: +// - /~https://github.com/torvalds/linux/blob/v6.10/Documentation/arch/riscv/hwprobe.rst +// - /~https://github.com/golang/sys/commit/3283fc3f6160baf63bec24fbaa24e094e9ff6daf + +include!("common.rs"); + +// core::ffi::c_* (except c_void) requires Rust 1.64, libc will soon require Rust 1.47 +#[allow(non_camel_case_types, non_upper_case_globals)] +mod ffi { + pub(crate) use super::c_types::c_long; + + extern "C" { + // https://man7.org/linux/man-pages/man2/syscall.2.html + // /~https://github.com/rust-lang/libc/blob/0.2.139/src/unix/linux_like/android/mod.rs#L3215 + // /~https://github.com/rust-lang/libc/blob/0.2.139/src/unix/linux_like/linux/mod.rs#L4080 + pub(crate) fn syscall(number: c_long, ...) -> c_long; + } + + // /~https://github.com/torvalds/linux/blob/v6.10/arch/riscv/include/uapi/asm/hwprobe.h + #[derive(Copy, Clone)] + #[repr(C)] + pub(crate) struct riscv_hwprobe { + pub(crate) key: i64, + pub(crate) value: u64, + } + + pub(crate) const __NR_riscv_hwprobe: c_long = 258; + + // /~https://github.com/torvalds/linux/blob/v6.10/arch/riscv/include/uapi/asm/hwprobe.h + pub(crate) const RISCV_HWPROBE_KEY_IMA_EXT_0: i64 = 4; + pub(crate) const RISCV_HWPROBE_EXT_ZACAS: u64 = 1 << 34; +} + +fn riscv_hwprobe(out: &mut ffi::riscv_hwprobe, flags: usize) -> bool { + // SAFETY: We've passed the valid pointer and length. + unsafe { + ffi::syscall( + ffi::__NR_riscv_hwprobe, + out as *mut ffi::riscv_hwprobe, + 1_usize, + 0_usize, + 0_usize, + flags, + 0_usize, + ) == 0 + } +} + +#[cold] +fn _detect(info: &mut CpuInfo) { + let mut out = ffi::riscv_hwprobe { key: ffi::RISCV_HWPROBE_KEY_IMA_EXT_0, value: 0 }; + if riscv_hwprobe(&mut out, 0) { + if out.key != -1 { + if out.value & ffi::RISCV_HWPROBE_EXT_ZACAS != 0 { + info.set(CpuInfo::HAS_ZACAS); + } + } + } +} + +#[allow( + clippy::alloc_instead_of_core, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core, + clippy::undocumented_unsafe_blocks, + clippy::wildcard_imports +)] +#[cfg(test)] +mod tests { + use super::*; + + // Static assertions for FFI bindings. + // This checks that FFI bindings defined in this crate, FFI bindings defined + // in libc, and FFI bindings generated for the platform's latest header file + // using bindgen have compatible signatures (or the same values if constants). + // Since this is static assertion, we can detect problems with + // `cargo check --tests --target ` run in CI (via TESTS=1 build.sh) + // without actually running tests on these platforms. + // See also tools/codegen/src/ffi.rs. + // TODO(codegen): auto-generate this test + #[allow( + clippy::cast_possible_wrap, + clippy::cast_sign_loss, + clippy::no_effect_underscore_binding + )] + const _: fn() = || { + use test_helper::sys; + // TODO: syscall,riscv_hwprobe + // static_assert!(ffi::__NR_riscv_hwprobe == libc::__NR_riscv_hwprobe); + static_assert!(ffi::__NR_riscv_hwprobe == sys::__NR_riscv_hwprobe as ffi::c_long); + // static_assert!(ffi::RISCV_HWPROBE_KEY_IMA_EXT_0 == libc::RISCV_HWPROBE_KEY_IMA_EXT_0); + static_assert!(ffi::RISCV_HWPROBE_KEY_IMA_EXT_0 == sys::RISCV_HWPROBE_KEY_IMA_EXT_0 as i64); + // static_assert!(ffi::RISCV_HWPROBE_EXT_ZACAS == libc::RISCV_HWPROBE_EXT_ZACAS); + static_assert!(ffi::RISCV_HWPROBE_EXT_ZACAS == sys::RISCV_HWPROBE_EXT_ZACAS); + }; +} diff --git a/src/imp/atomic128/macros.rs b/src/imp/atomic128/macros.rs index 251120f20..dd1f34e9e 100644 --- a/src/imp/atomic128/macros.rs +++ b/src/imp/atomic128/macros.rs @@ -264,7 +264,12 @@ macro_rules! atomic128 { }; } -#[cfg(any(target_arch = "powerpc64", target_arch = "s390x", target_arch = "x86_64"))] +#[cfg(any( + target_arch = "powerpc64", + target_arch = "riscv64", + target_arch = "s390x", + target_arch = "x86_64", +))] #[allow(unused_macros)] // also used by intrinsics.rs macro_rules! atomic_rmw_by_atomic_update { () => { diff --git a/src/imp/atomic128/riscv64.rs b/src/imp/atomic128/riscv64.rs new file mode 100644 index 000000000..3e00abdc2 --- /dev/null +++ b/src/imp/atomic128/riscv64.rs @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +// Atomic{I,U}128 implementation on riscv64 using amocas.q (DWCAS). +// +// Note: On Miri and ThreadSanitizer which do not support inline assembly, we don't use +// this module and use intrinsics.rs instead. +// +// Refs: +// - ""Zacas" Extension for Atomic Compare-and-Swap (CAS) Instructions" in RISC-V Instruction Set Manual +// /~https://github.com/riscv/riscv-isa-manual/blob/riscv-isa-release-8b9dc50-2024-08-30/src/zacas.adoc +// - RISC-V Atomics ABI Specification +// /~https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/draft-20240829-13bfa9f54634cb60d86b9b333e109f077805b4b3/riscv-atomic.adoc +// +// Generated asm: +// - riscv64 (+experimental-zacas) https://godbolt.org/z/bofbnzsvG + +// TODO: 64-bit atomic using amocas.d for riscv32 + +include!("macros.rs"); + +// TODO +// #[cfg(not(any(target_feature = "experimental-zacas", portable_atomic_target_feature = "experimental-zacas")))] +// #[path = "../fallback/outline_atomics.rs"] +// mod fallback; + +// On musl with static linking, it seems that libc is not always available. +// See detect/auxv.rs for more. +#[cfg(test)] // TODO +#[cfg(not(portable_atomic_no_outline_atomics))] +#[cfg(any(test, portable_atomic_outline_atomics))] // TODO(riscv64): currently disabled by default +#[cfg(any( + test, + not(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" + )) +))] +#[cfg(any( + all( + target_os = "linux", + any( + target_env = "gnu", + all(any(target_env = "musl", target_env = "ohos"), not(target_feature = "crt-static")), + portable_atomic_outline_atomics, + ), + ), + target_os = "android", +))] +#[path = "detect/riscv64_linux.rs"] +mod detect; + +use core::{arch::asm, sync::atomic::Ordering}; + +use crate::utils::{Pair, U128}; + +// /~https://github.com/riscv-non-isa/riscv-asm-manual/blob/HEAD/riscv-asm.md#arch +#[cfg(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" +))] +macro_rules! start_zacas { + () => { + // zacas available, no-op + "" + }; +} +#[cfg(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" +))] +macro_rules! end_zacas { + () => { + // zacas available, no-op + "" + }; +} +#[cfg(not(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" +)))] +macro_rules! start_zacas { + () => { + ".option push\n.option arch, +experimental-zacas" + }; +} +#[cfg(not(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" +)))] +macro_rules! end_zacas { + () => { + ".option pop" + }; +} + +macro_rules! atomic_rmw_amo_order { + ($op:ident, $order:ident) => { + match $order { + Ordering::Relaxed => $op!("", ""), + Ordering::Acquire => $op!("", ".aq"), + Ordering::Release => $op!("", ".rl"), + Ordering::AcqRel => $op!("", ".aqrl"), + Ordering::SeqCst => $op!("fence rw,rw", ".aqrl"), + _ => unreachable!(), + } + }; +} + +#[inline] +unsafe fn atomic_load(src: *mut u128, order: Ordering) -> u128 { + debug_assert!(src as usize % 16 == 0); + + // SAFETY: the caller must uphold the safety contract. + unsafe { + let (out_lo, out_hi); + macro_rules! load { + ($fence:tt, $asm_order:tt) => { + asm!( + start_zacas!(), + $fence, + concat!("amocas.q", $asm_order, " a2, a2, 0({src})"), + end_zacas!(), + src = in(reg) ptr_reg!(src), + inout("a2") 0_u64 => out_lo, + inout("a3") 0_u64 => out_hi, + options(nostack, preserves_flags), + ) + }; + } + atomic_rmw_amo_order!(load, order); + U128 { pair: Pair { lo: out_lo, hi: out_hi } }.whole + } +} + +#[inline] +unsafe fn atomic_store(dst: *mut u128, val: u128, order: Ordering) { + // SAFETY: the caller must uphold the safety contract. + unsafe { + atomic_swap(dst, val, order); + } +} + +#[inline] +unsafe fn atomic_compare_exchange( + dst: *mut u128, + old: u128, + new: u128, + success: Ordering, + failure: Ordering, +) -> Result { + debug_assert!(dst as usize % 16 == 0); + let order = crate::utils::upgrade_success_ordering(success, failure); + + // SAFETY: the caller must uphold the safety contract. + let prev = unsafe { + let old = U128 { whole: old }; + let new = U128 { whole: new }; + let (prev_lo, prev_hi); + macro_rules! cmpxchg { + ($fence:tt, $asm_order:tt) => { + asm!( + start_zacas!(), + $fence, + concat!("amocas.q", $asm_order, " a4, a2, 0({dst})"), + end_zacas!(), + dst = in(reg) ptr_reg!(dst), + // must be allocated to even/odd register pair + inout("a4") old.pair.lo => prev_lo, + inout("a5") old.pair.hi => prev_hi, + // must be allocated to even/odd register pair + in("a2") new.pair.lo, + in("a3") new.pair.hi, + options(nostack, preserves_flags), + ) + }; + } + atomic_rmw_amo_order!(cmpxchg, order); + U128 { pair: Pair { lo: prev_lo, hi: prev_hi } }.whole + }; + if prev == old { + Ok(prev) + } else { + Err(prev) + } +} + +// amocas is always strong. +use atomic_compare_exchange as atomic_compare_exchange_weak; + +// 128-bit atomic load by two 64-bit atomic loads. +#[inline] +unsafe fn byte_wise_atomic_load(src: *const u128) -> u128 { + // SAFETY: the caller must uphold the safety contract. + unsafe { + let (out_lo, out_hi); + asm!( + "ld {out_lo}, ({src})", + "ld {out_hi}, 8({src})", + src = in(reg) src, + out_lo = out(reg) out_lo, + out_hi = out(reg) out_hi, + options(pure, nostack, preserves_flags, readonly), + ); + U128 { pair: Pair { lo: out_lo, hi: out_hi } }.whole + } +} + +#[inline(always)] +unsafe fn atomic_update(dst: *mut u128, order: Ordering, mut f: F) -> u128 +where + F: FnMut(u128) -> u128, +{ + // SAFETY: the caller must uphold the safety contract. + unsafe { + let mut prev = byte_wise_atomic_load(dst); + loop { + let next = f(prev); + match atomic_compare_exchange_weak(dst, prev, next, order, Ordering::Relaxed) { + Ok(x) => return x, + Err(x) => prev = x, + } + } + } +} + +atomic_rmw_by_atomic_update!(); + +#[inline] +fn is_lock_free() -> bool { + #[cfg(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" + ))] + { + // zacas is available at compile-time. + true + } + #[cfg(not(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" + )))] + { + detect::detect().has_zacas() + } +} +const IS_ALWAYS_LOCK_FREE: bool = cfg!(any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas" +)); + +atomic128!(AtomicI128, i128, atomic_max, atomic_min); +atomic128!(AtomicU128, u128, atomic_umax, atomic_umin); + +#[allow(clippy::undocumented_unsafe_blocks, clippy::wildcard_imports)] +#[cfg(test)] +mod tests { + use super::*; + + test_atomic_int!(i128); + test_atomic_int!(u128); + + // load/store/swap implementation is not affected by signedness, so it is + // enough to test only unsigned types. + stress_test!(u128); +} diff --git a/src/imp/mod.rs b/src/imp/mod.rs index 862d1a064..ced224587 100644 --- a/src/imp/mod.rs +++ b/src/imp/mod.rs @@ -64,6 +64,41 @@ mod aarch64; #[cfg_attr(not(any(miri, portable_atomic_sanitize_thread)), path = "atomic128/x86_64.rs")] mod x86_64; +// riscv64 128-bit atomics +#[cfg(all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + // TODO(riscv64) + // all( + // feature = "fallback", + // not(portable_atomic_no_outline_atomics), + // any(test, portable_atomic_outline_atomics), // TODO(riscv64): currently disabled by default + // any( + // all( + // target_os = "linux", + // any( + // target_env = "gnu", + // all( + // any(target_env = "musl", target_env = "ohos"), + // not(target_feature = "crt-static"), + // ), + // portable_atomic_outline_atomics, + // ), + // ), + // target_os = "android", + // ), + // not(any(miri, portable_atomic_sanitize_thread)), + // ), + ), +))] +// Use intrinsics.rs on Miri and Sanitizer that do not support inline assembly. +#[cfg_attr(any(miri, portable_atomic_sanitize_thread), path = "atomic128/intrinsics.rs")] +#[cfg_attr(not(any(miri, portable_atomic_sanitize_thread)), path = "atomic128/riscv64.rs")] +mod riscv64; + // powerpc64 128-bit atomics #[cfg(all( target_arch = "powerpc64", @@ -178,6 +213,14 @@ mod x86; any(not(portable_atomic_no_asm), portable_atomic_unstable_asm), any(target_feature = "cmpxchg16b", portable_atomic_target_feature = "cmpxchg16b"), ), + all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + ), + ), all( target_arch = "powerpc64", portable_atomic_unstable_asm_experimental_arch, @@ -354,6 +397,35 @@ items! { ), ), ), + all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + // TODO(riscv64) + // all( + // feature = "fallback", + // not(portable_atomic_no_outline_atomics), + // any(test, portable_atomic_outline_atomics), // TODO(riscv64): currently disabled by default + // any( + // all( + // target_os = "linux", + // any( + // target_env = "gnu", + // all( + // any(target_env = "musl", target_env = "ohos"), + // not(target_feature = "crt-static"), + // ), + // portable_atomic_outline_atomics, + // ), + // ), + // target_os = "android", + // ), + // not(any(miri, portable_atomic_sanitize_thread)), + // ), + ), + ), all( target_arch = "powerpc64", portable_atomic_unstable_asm_experimental_arch, @@ -427,6 +499,37 @@ pub(crate) use self::aarch64::{AtomicI128, AtomicU128}; ), ))] pub(crate) use self::x86_64::{AtomicI128, AtomicU128}; +// riscv64 & zacas +#[cfg(all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + // TODO(riscv64) + // all( + // feature = "fallback", + // not(portable_atomic_no_outline_atomics), + // any(test, portable_atomic_outline_atomics), // TODO(riscv64): currently disabled by default + // any( + // all( + // target_os = "linux", + // any( + // target_env = "gnu", + // all( + // any(target_env = "musl", target_env = "ohos"), + // not(target_feature = "crt-static"), + // ), + // portable_atomic_outline_atomics, + // ), + // ), + // target_os = "android", + // ), + // not(any(miri, portable_atomic_sanitize_thread)), + // ), + ), +))] +pub(crate) use self::riscv64::{AtomicI128, AtomicU128}; // powerpc64 & (pwr8 | outline-atomics) #[cfg(all( target_arch = "powerpc64", diff --git a/src/imp/riscv.rs b/src/imp/riscv.rs index a4c3b7d0c..7d0333fdc 100644 --- a/src/imp/riscv.rs +++ b/src/imp/riscv.rs @@ -22,6 +22,8 @@ // - riscv64gc https://godbolt.org/z/x8bhEn39e // - riscv32imac https://godbolt.org/z/aG9157dhW +// TODO: amocas + #[cfg(not(portable_atomic_no_asm))] use core::arch::asm; use core::{cell::UnsafeCell, sync::atomic::Ordering}; diff --git a/src/lib.rs b/src/lib.rs index 83c59147b..76ebbb3f2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -271,14 +271,24 @@ RUSTFLAGS="--cfg portable_atomic_no_outline_atomics" cargo ... // fallback and causing memory ordering problems to be missed by these checkers. #![cfg_attr( all( - any(target_arch = "aarch64", target_arch = "powerpc64", target_arch = "s390x"), + any( + target_arch = "aarch64", + target_arch = "powerpc64", + target_arch = "riscv64", + target_arch = "s390x", + ), any(miri, portable_atomic_sanitize_thread), ), allow(internal_features) )] #![cfg_attr( all( - any(target_arch = "aarch64", target_arch = "powerpc64", target_arch = "s390x"), + any( + target_arch = "aarch64", + target_arch = "powerpc64", + target_arch = "riscv64", + target_arch = "s390x", + ), any(miri, portable_atomic_sanitize_thread), ), feature(core_intrinsics) diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 1042a9ae8..2f9514a83 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -117,6 +117,14 @@ fn test_is_lock_free() { target_arch = "x86_64", any(target_feature = "cmpxchg16b", portable_atomic_target_feature = "cmpxchg16b"), ), + all( + target_arch = "riscv64", + not(portable_atomic_no_asm), + any( + target_feature = "experimental-zacas", + portable_atomic_target_feature = "experimental-zacas", + ), + ), all( target_arch = "powerpc64", portable_atomic_unstable_asm_experimental_arch, diff --git a/src/utils.rs b/src/utils.rs index 2ad488224..7dda05a2c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -344,6 +344,7 @@ pub(crate) fn zero_extend64_ptr(v: *mut ()) -> core::mem::MaybeUninit { #[cfg(any( target_arch = "aarch64", target_arch = "powerpc64", + target_arch = "riscv64", target_arch = "s390x", target_arch = "x86_64", ))] diff --git a/tests/helper/src/gen/sys/mod.rs b/tests/helper/src/gen/sys/mod.rs index 87eda3f3f..f2d47ec00 100644 --- a/tests/helper/src/gen/sys/mod.rs +++ b/tests/helper/src/gen/sys/mod.rs @@ -230,6 +230,64 @@ mod powerpc64le_linux_musl; ) )] pub use powerpc64le_linux_musl::*; +#[cfg( + all( + target_arch = "riscv64", + target_os = "linux", + target_env = "gnu", + target_endian = "little", + target_pointer_width = "64" + ) +)] +mod riscv64gc_linux_gnu; +#[cfg( + all( + target_arch = "riscv64", + target_os = "linux", + target_env = "gnu", + target_endian = "little", + target_pointer_width = "64" + ) +)] +pub use riscv64gc_linux_gnu::*; +#[cfg( + all( + target_arch = "riscv64", + target_os = "linux", + target_env = "musl", + target_endian = "little", + target_pointer_width = "64" + ) +)] +mod riscv64gc_linux_musl; +#[cfg( + all( + target_arch = "riscv64", + target_os = "linux", + target_env = "musl", + target_endian = "little", + target_pointer_width = "64" + ) +)] +pub use riscv64gc_linux_musl::*; +#[cfg( + all( + target_arch = "riscv64", + target_os = "android", + target_endian = "little", + target_pointer_width = "64" + ) +)] +mod riscv64_linux_android; +#[cfg( + all( + target_arch = "riscv64", + target_os = "android", + target_endian = "little", + target_pointer_width = "64" + ) +)] +pub use riscv64_linux_android::*; #[cfg( all( target_arch = "aarch64", diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/elf.rs b/tests/helper/src/gen/sys/riscv64_linux_android/elf.rs new file mode 100644 index 000000000..d776ec3a5 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/elf.rs @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub type __u32 = ::std::os::raw::c_uint; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf32_auxv_t { + pub a_type: __u32, + pub a_un: Elf32_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf32_auxv_t__bindgen_ty_1 { + pub a_val: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf64_auxv_t { + pub a_type: __u64, + pub a_un: Elf64_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf64_auxv_t__bindgen_ty_1 { + pub a_val: __u64, +} diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_hwprobe.rs b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_hwprobe.rs new file mode 100644 index 000000000..ee3d3d307 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_hwprobe.rs @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct riscv_hwprobe { + pub key: __s64, + pub value: __u64, +} +pub const RISCV_HWPROBE_KEY_MVENDORID: u32 = 0; +pub const RISCV_HWPROBE_KEY_MARCHID: u32 = 1; +pub const RISCV_HWPROBE_KEY_MIMPID: u32 = 2; +pub const RISCV_HWPROBE_KEY_BASE_BEHAVIOR: u32 = 3; +pub const RISCV_HWPROBE_BASE_BEHAVIOR_IMA: u32 = 1; +pub const RISCV_HWPROBE_KEY_IMA_EXT_0: u32 = 4; +pub const RISCV_HWPROBE_IMA_FD: u32 = 1; +pub const RISCV_HWPROBE_IMA_C: u32 = 2; +pub const RISCV_HWPROBE_IMA_V: u32 = 4; +pub const RISCV_HWPROBE_EXT_ZBA: u32 = 8; +pub const RISCV_HWPROBE_EXT_ZBB: u32 = 16; +pub const RISCV_HWPROBE_EXT_ZBS: u32 = 32; +pub const RISCV_HWPROBE_EXT_ZICBOZ: u32 = 64; +pub const RISCV_HWPROBE_EXT_ZBC: u32 = 128; +pub const RISCV_HWPROBE_EXT_ZBKB: u32 = 256; +pub const RISCV_HWPROBE_EXT_ZBKC: u32 = 512; +pub const RISCV_HWPROBE_EXT_ZBKX: u32 = 1024; +pub const RISCV_HWPROBE_EXT_ZKND: u32 = 2048; +pub const RISCV_HWPROBE_EXT_ZKNE: u32 = 4096; +pub const RISCV_HWPROBE_EXT_ZKNH: u32 = 8192; +pub const RISCV_HWPROBE_EXT_ZKSED: u32 = 16384; +pub const RISCV_HWPROBE_EXT_ZKSH: u32 = 32768; +pub const RISCV_HWPROBE_EXT_ZKT: u32 = 65536; +pub const RISCV_HWPROBE_EXT_ZVBB: u32 = 131072; +pub const RISCV_HWPROBE_EXT_ZVBC: u32 = 262144; +pub const RISCV_HWPROBE_EXT_ZVKB: u32 = 524288; +pub const RISCV_HWPROBE_EXT_ZVKG: u32 = 1048576; +pub const RISCV_HWPROBE_EXT_ZVKNED: u32 = 2097152; +pub const RISCV_HWPROBE_EXT_ZVKNHA: u32 = 4194304; +pub const RISCV_HWPROBE_EXT_ZVKNHB: u32 = 8388608; +pub const RISCV_HWPROBE_EXT_ZVKSED: u32 = 16777216; +pub const RISCV_HWPROBE_EXT_ZVKSH: u32 = 33554432; +pub const RISCV_HWPROBE_EXT_ZVKT: u32 = 67108864; +pub const RISCV_HWPROBE_EXT_ZFH: u32 = 134217728; +pub const RISCV_HWPROBE_EXT_ZFHMIN: u32 = 268435456; +pub const RISCV_HWPROBE_EXT_ZIHINTNTL: u32 = 536870912; +pub const RISCV_HWPROBE_EXT_ZVFH: u32 = 1073741824; +pub const RISCV_HWPROBE_EXT_ZVFHMIN: u32 = 2147483648; +pub const RISCV_HWPROBE_EXT_ZFA: u64 = 4294967296; +pub const RISCV_HWPROBE_EXT_ZTSO: u64 = 8589934592; +pub const RISCV_HWPROBE_EXT_ZACAS: u64 = 17179869184; +pub const RISCV_HWPROBE_EXT_ZICOND: u64 = 34359738368; +pub const RISCV_HWPROBE_EXT_ZIHINTPAUSE: u64 = 68719476736; +pub const RISCV_HWPROBE_EXT_ZVE32X: u64 = 137438953472; +pub const RISCV_HWPROBE_EXT_ZVE32F: u64 = 274877906944; +pub const RISCV_HWPROBE_EXT_ZVE64X: u64 = 549755813888; +pub const RISCV_HWPROBE_EXT_ZVE64F: u64 = 1099511627776; +pub const RISCV_HWPROBE_EXT_ZVE64D: u64 = 2199023255552; +pub const RISCV_HWPROBE_EXT_ZIMOP: u64 = 4398046511104; +pub const RISCV_HWPROBE_EXT_ZCA: u64 = 8796093022208; +pub const RISCV_HWPROBE_EXT_ZCB: u64 = 17592186044416; +pub const RISCV_HWPROBE_EXT_ZCD: u64 = 35184372088832; +pub const RISCV_HWPROBE_EXT_ZCF: u64 = 70368744177664; +pub const RISCV_HWPROBE_EXT_ZCMOP: u64 = 140737488355328; +pub const RISCV_HWPROBE_EXT_ZAWRS: u64 = 281474976710656; +pub const RISCV_HWPROBE_KEY_CPUPERF_0: u32 = 5; +pub const RISCV_HWPROBE_MISALIGNED_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_MISALIGNED_MASK: u32 = 7; +pub const RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE: u32 = 6; +pub const RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS: u32 = 7; +pub const RISCV_HWPROBE_KEY_TIME_CSR_FREQ: u32 = 8; +pub const RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF: u32 = 9; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_WHICH_CPUS: u32 = 1; diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_unistd.rs b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_unistd.rs new file mode 100644 index 000000000..a2c4d4729 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_asm_unistd.rs @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const __NR_io_setup: u32 = 0; +pub const __NR_io_destroy: u32 = 1; +pub const __NR_io_submit: u32 = 2; +pub const __NR_io_cancel: u32 = 3; +pub const __NR_io_getevents: u32 = 4; +pub const __NR_setxattr: u32 = 5; +pub const __NR_lsetxattr: u32 = 6; +pub const __NR_fsetxattr: u32 = 7; +pub const __NR_getxattr: u32 = 8; +pub const __NR_lgetxattr: u32 = 9; +pub const __NR_fgetxattr: u32 = 10; +pub const __NR_listxattr: u32 = 11; +pub const __NR_llistxattr: u32 = 12; +pub const __NR_flistxattr: u32 = 13; +pub const __NR_removexattr: u32 = 14; +pub const __NR_lremovexattr: u32 = 15; +pub const __NR_fremovexattr: u32 = 16; +pub const __NR_getcwd: u32 = 17; +pub const __NR_lookup_dcookie: u32 = 18; +pub const __NR_eventfd2: u32 = 19; +pub const __NR_epoll_create1: u32 = 20; +pub const __NR_epoll_ctl: u32 = 21; +pub const __NR_epoll_pwait: u32 = 22; +pub const __NR_dup: u32 = 23; +pub const __NR_dup3: u32 = 24; +pub const __NR_fcntl: u32 = 25; +pub const __NR_inotify_init1: u32 = 26; +pub const __NR_inotify_add_watch: u32 = 27; +pub const __NR_inotify_rm_watch: u32 = 28; +pub const __NR_ioctl: u32 = 29; +pub const __NR_ioprio_set: u32 = 30; +pub const __NR_ioprio_get: u32 = 31; +pub const __NR_flock: u32 = 32; +pub const __NR_mknodat: u32 = 33; +pub const __NR_mkdirat: u32 = 34; +pub const __NR_unlinkat: u32 = 35; +pub const __NR_symlinkat: u32 = 36; +pub const __NR_linkat: u32 = 37; +pub const __NR_umount2: u32 = 39; +pub const __NR_mount: u32 = 40; +pub const __NR_pivot_root: u32 = 41; +pub const __NR_nfsservctl: u32 = 42; +pub const __NR_statfs: u32 = 43; +pub const __NR_fstatfs: u32 = 44; +pub const __NR_truncate: u32 = 45; +pub const __NR_ftruncate: u32 = 46; +pub const __NR_fallocate: u32 = 47; +pub const __NR_faccessat: u32 = 48; +pub const __NR_chdir: u32 = 49; +pub const __NR_fchdir: u32 = 50; +pub const __NR_chroot: u32 = 51; +pub const __NR_fchmod: u32 = 52; +pub const __NR_fchmodat: u32 = 53; +pub const __NR_fchownat: u32 = 54; +pub const __NR_fchown: u32 = 55; +pub const __NR_openat: u32 = 56; +pub const __NR_close: u32 = 57; +pub const __NR_vhangup: u32 = 58; +pub const __NR_pipe2: u32 = 59; +pub const __NR_quotactl: u32 = 60; +pub const __NR_getdents64: u32 = 61; +pub const __NR_lseek: u32 = 62; +pub const __NR_read: u32 = 63; +pub const __NR_write: u32 = 64; +pub const __NR_readv: u32 = 65; +pub const __NR_writev: u32 = 66; +pub const __NR_pread64: u32 = 67; +pub const __NR_pwrite64: u32 = 68; +pub const __NR_preadv: u32 = 69; +pub const __NR_pwritev: u32 = 70; +pub const __NR_sendfile: u32 = 71; +pub const __NR_pselect6: u32 = 72; +pub const __NR_ppoll: u32 = 73; +pub const __NR_signalfd4: u32 = 74; +pub const __NR_vmsplice: u32 = 75; +pub const __NR_splice: u32 = 76; +pub const __NR_tee: u32 = 77; +pub const __NR_readlinkat: u32 = 78; +pub const __NR_newfstatat: u32 = 79; +pub const __NR_fstat: u32 = 80; +pub const __NR_sync: u32 = 81; +pub const __NR_fsync: u32 = 82; +pub const __NR_fdatasync: u32 = 83; +pub const __NR_sync_file_range: u32 = 84; +pub const __NR_timerfd_create: u32 = 85; +pub const __NR_timerfd_settime: u32 = 86; +pub const __NR_timerfd_gettime: u32 = 87; +pub const __NR_utimensat: u32 = 88; +pub const __NR_acct: u32 = 89; +pub const __NR_capget: u32 = 90; +pub const __NR_capset: u32 = 91; +pub const __NR_personality: u32 = 92; +pub const __NR_exit: u32 = 93; +pub const __NR_exit_group: u32 = 94; +pub const __NR_waitid: u32 = 95; +pub const __NR_set_tid_address: u32 = 96; +pub const __NR_unshare: u32 = 97; +pub const __NR_futex: u32 = 98; +pub const __NR_set_robust_list: u32 = 99; +pub const __NR_get_robust_list: u32 = 100; +pub const __NR_nanosleep: u32 = 101; +pub const __NR_getitimer: u32 = 102; +pub const __NR_setitimer: u32 = 103; +pub const __NR_kexec_load: u32 = 104; +pub const __NR_init_module: u32 = 105; +pub const __NR_delete_module: u32 = 106; +pub const __NR_timer_create: u32 = 107; +pub const __NR_timer_gettime: u32 = 108; +pub const __NR_timer_getoverrun: u32 = 109; +pub const __NR_timer_settime: u32 = 110; +pub const __NR_timer_delete: u32 = 111; +pub const __NR_clock_settime: u32 = 112; +pub const __NR_clock_gettime: u32 = 113; +pub const __NR_clock_getres: u32 = 114; +pub const __NR_clock_nanosleep: u32 = 115; +pub const __NR_syslog: u32 = 116; +pub const __NR_ptrace: u32 = 117; +pub const __NR_sched_setparam: u32 = 118; +pub const __NR_sched_setscheduler: u32 = 119; +pub const __NR_sched_getscheduler: u32 = 120; +pub const __NR_sched_getparam: u32 = 121; +pub const __NR_sched_setaffinity: u32 = 122; +pub const __NR_sched_getaffinity: u32 = 123; +pub const __NR_sched_yield: u32 = 124; +pub const __NR_sched_get_priority_max: u32 = 125; +pub const __NR_sched_get_priority_min: u32 = 126; +pub const __NR_sched_rr_get_interval: u32 = 127; +pub const __NR_restart_syscall: u32 = 128; +pub const __NR_kill: u32 = 129; +pub const __NR_tkill: u32 = 130; +pub const __NR_tgkill: u32 = 131; +pub const __NR_sigaltstack: u32 = 132; +pub const __NR_rt_sigsuspend: u32 = 133; +pub const __NR_rt_sigaction: u32 = 134; +pub const __NR_rt_sigprocmask: u32 = 135; +pub const __NR_rt_sigpending: u32 = 136; +pub const __NR_rt_sigtimedwait: u32 = 137; +pub const __NR_rt_sigqueueinfo: u32 = 138; +pub const __NR_rt_sigreturn: u32 = 139; +pub const __NR_setpriority: u32 = 140; +pub const __NR_getpriority: u32 = 141; +pub const __NR_reboot: u32 = 142; +pub const __NR_setregid: u32 = 143; +pub const __NR_setgid: u32 = 144; +pub const __NR_setreuid: u32 = 145; +pub const __NR_setuid: u32 = 146; +pub const __NR_setresuid: u32 = 147; +pub const __NR_getresuid: u32 = 148; +pub const __NR_setresgid: u32 = 149; +pub const __NR_getresgid: u32 = 150; +pub const __NR_setfsuid: u32 = 151; +pub const __NR_setfsgid: u32 = 152; +pub const __NR_times: u32 = 153; +pub const __NR_setpgid: u32 = 154; +pub const __NR_getpgid: u32 = 155; +pub const __NR_getsid: u32 = 156; +pub const __NR_setsid: u32 = 157; +pub const __NR_getgroups: u32 = 158; +pub const __NR_setgroups: u32 = 159; +pub const __NR_uname: u32 = 160; +pub const __NR_sethostname: u32 = 161; +pub const __NR_setdomainname: u32 = 162; +pub const __NR_getrlimit: u32 = 163; +pub const __NR_setrlimit: u32 = 164; +pub const __NR_getrusage: u32 = 165; +pub const __NR_umask: u32 = 166; +pub const __NR_prctl: u32 = 167; +pub const __NR_getcpu: u32 = 168; +pub const __NR_gettimeofday: u32 = 169; +pub const __NR_settimeofday: u32 = 170; +pub const __NR_adjtimex: u32 = 171; +pub const __NR_getpid: u32 = 172; +pub const __NR_getppid: u32 = 173; +pub const __NR_getuid: u32 = 174; +pub const __NR_geteuid: u32 = 175; +pub const __NR_getgid: u32 = 176; +pub const __NR_getegid: u32 = 177; +pub const __NR_gettid: u32 = 178; +pub const __NR_sysinfo: u32 = 179; +pub const __NR_mq_open: u32 = 180; +pub const __NR_mq_unlink: u32 = 181; +pub const __NR_mq_timedsend: u32 = 182; +pub const __NR_mq_timedreceive: u32 = 183; +pub const __NR_mq_notify: u32 = 184; +pub const __NR_mq_getsetattr: u32 = 185; +pub const __NR_msgget: u32 = 186; +pub const __NR_msgctl: u32 = 187; +pub const __NR_msgrcv: u32 = 188; +pub const __NR_msgsnd: u32 = 189; +pub const __NR_semget: u32 = 190; +pub const __NR_semctl: u32 = 191; +pub const __NR_semtimedop: u32 = 192; +pub const __NR_semop: u32 = 193; +pub const __NR_shmget: u32 = 194; +pub const __NR_shmctl: u32 = 195; +pub const __NR_shmat: u32 = 196; +pub const __NR_shmdt: u32 = 197; +pub const __NR_socket: u32 = 198; +pub const __NR_socketpair: u32 = 199; +pub const __NR_bind: u32 = 200; +pub const __NR_listen: u32 = 201; +pub const __NR_accept: u32 = 202; +pub const __NR_connect: u32 = 203; +pub const __NR_getsockname: u32 = 204; +pub const __NR_getpeername: u32 = 205; +pub const __NR_sendto: u32 = 206; +pub const __NR_recvfrom: u32 = 207; +pub const __NR_setsockopt: u32 = 208; +pub const __NR_getsockopt: u32 = 209; +pub const __NR_shutdown: u32 = 210; +pub const __NR_sendmsg: u32 = 211; +pub const __NR_recvmsg: u32 = 212; +pub const __NR_readahead: u32 = 213; +pub const __NR_brk: u32 = 214; +pub const __NR_munmap: u32 = 215; +pub const __NR_mremap: u32 = 216; +pub const __NR_add_key: u32 = 217; +pub const __NR_request_key: u32 = 218; +pub const __NR_keyctl: u32 = 219; +pub const __NR_clone: u32 = 220; +pub const __NR_execve: u32 = 221; +pub const __NR_mmap: u32 = 222; +pub const __NR_fadvise64: u32 = 223; +pub const __NR_swapon: u32 = 224; +pub const __NR_swapoff: u32 = 225; +pub const __NR_mprotect: u32 = 226; +pub const __NR_msync: u32 = 227; +pub const __NR_mlock: u32 = 228; +pub const __NR_munlock: u32 = 229; +pub const __NR_mlockall: u32 = 230; +pub const __NR_munlockall: u32 = 231; +pub const __NR_mincore: u32 = 232; +pub const __NR_madvise: u32 = 233; +pub const __NR_remap_file_pages: u32 = 234; +pub const __NR_mbind: u32 = 235; +pub const __NR_get_mempolicy: u32 = 236; +pub const __NR_set_mempolicy: u32 = 237; +pub const __NR_migrate_pages: u32 = 238; +pub const __NR_move_pages: u32 = 239; +pub const __NR_rt_tgsigqueueinfo: u32 = 240; +pub const __NR_perf_event_open: u32 = 241; +pub const __NR_accept4: u32 = 242; +pub const __NR_recvmmsg: u32 = 243; +pub const __NR_riscv_hwprobe: u32 = 258; +pub const __NR_riscv_flush_icache: u32 = 259; +pub const __NR_wait4: u32 = 260; +pub const __NR_prlimit64: u32 = 261; +pub const __NR_fanotify_init: u32 = 262; +pub const __NR_fanotify_mark: u32 = 263; +pub const __NR_name_to_handle_at: u32 = 264; +pub const __NR_open_by_handle_at: u32 = 265; +pub const __NR_clock_adjtime: u32 = 266; +pub const __NR_syncfs: u32 = 267; +pub const __NR_setns: u32 = 268; +pub const __NR_sendmmsg: u32 = 269; +pub const __NR_process_vm_readv: u32 = 270; +pub const __NR_process_vm_writev: u32 = 271; +pub const __NR_kcmp: u32 = 272; +pub const __NR_finit_module: u32 = 273; +pub const __NR_sched_setattr: u32 = 274; +pub const __NR_sched_getattr: u32 = 275; +pub const __NR_renameat2: u32 = 276; +pub const __NR_seccomp: u32 = 277; +pub const __NR_getrandom: u32 = 278; +pub const __NR_memfd_create: u32 = 279; +pub const __NR_bpf: u32 = 280; +pub const __NR_execveat: u32 = 281; +pub const __NR_userfaultfd: u32 = 282; +pub const __NR_membarrier: u32 = 283; +pub const __NR_mlock2: u32 = 284; +pub const __NR_copy_file_range: u32 = 285; +pub const __NR_preadv2: u32 = 286; +pub const __NR_pwritev2: u32 = 287; +pub const __NR_pkey_mprotect: u32 = 288; +pub const __NR_pkey_alloc: u32 = 289; +pub const __NR_pkey_free: u32 = 290; +pub const __NR_statx: u32 = 291; +pub const __NR_io_pgetevents: u32 = 292; +pub const __NR_rseq: u32 = 293; +pub const __NR_kexec_file_load: u32 = 294; +pub const __NR_pidfd_send_signal: u32 = 424; +pub const __NR_io_uring_setup: u32 = 425; +pub const __NR_io_uring_enter: u32 = 426; +pub const __NR_io_uring_register: u32 = 427; +pub const __NR_open_tree: u32 = 428; +pub const __NR_move_mount: u32 = 429; +pub const __NR_fsopen: u32 = 430; +pub const __NR_fsconfig: u32 = 431; +pub const __NR_fsmount: u32 = 432; +pub const __NR_fspick: u32 = 433; +pub const __NR_pidfd_open: u32 = 434; +pub const __NR_clone3: u32 = 435; +pub const __NR_close_range: u32 = 436; +pub const __NR_openat2: u32 = 437; +pub const __NR_pidfd_getfd: u32 = 438; +pub const __NR_faccessat2: u32 = 439; +pub const __NR_process_madvise: u32 = 440; +pub const __NR_epoll_pwait2: u32 = 441; +pub const __NR_mount_setattr: u32 = 442; +pub const __NR_quotactl_fd: u32 = 443; +pub const __NR_landlock_create_ruleset: u32 = 444; +pub const __NR_landlock_add_rule: u32 = 445; +pub const __NR_landlock_restrict_self: u32 = 446; +pub const __NR_memfd_secret: u32 = 447; +pub const __NR_process_mrelease: u32 = 448; +pub const __NR_futex_waitv: u32 = 449; +pub const __NR_set_mempolicy_home_node: u32 = 450; +pub const __NR_cachestat: u32 = 451; +pub const __NR_fchmodat2: u32 = 452; +pub const __NR_map_shadow_stack: u32 = 453; +pub const __NR_futex_wake: u32 = 454; +pub const __NR_futex_wait: u32 = 455; +pub const __NR_futex_requeue: u32 = 456; +pub const __NR_statmount: u32 = 457; +pub const __NR_listmount: u32 = 458; +pub const __NR_lsm_get_self_attr: u32 = 459; +pub const __NR_lsm_set_self_attr: u32 = 460; +pub const __NR_lsm_list_modules: u32 = 461; +pub const __NR_mseal: u32 = 462; diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_auxvec.rs b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_auxvec.rs new file mode 100644 index 000000000..2b4a98bea --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_auxvec.rs @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const AT_HWCAP: u32 = 16; +pub const AT_HWCAP2: u32 = 26; +pub const AT_HWCAP3: u32 = 29; +pub const AT_HWCAP4: u32 = 30; diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_prctl.rs b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_prctl.rs new file mode 100644 index 000000000..0d4c45c68 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/linux_headers_linux_prctl.rs @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const PR_GET_AUXV: u32 = 1096112214; diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/mod.rs b/tests/helper/src/gen/sys/riscv64_linux_android/mod.rs new file mode 100644 index 000000000..88c31bbaf --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/mod.rs @@ -0,0 +1,413 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +#![cfg_attr(rustfmt, rustfmt::skip)] +mod linux_headers_linux_auxvec; +pub use linux_headers_linux_auxvec::AT_HWCAP; +pub use linux_headers_linux_auxvec::AT_HWCAP2; +pub use linux_headers_linux_auxvec::AT_HWCAP3; +pub use linux_headers_linux_auxvec::AT_HWCAP4; +mod linux_headers_linux_prctl; +pub use linux_headers_linux_prctl::PR_GET_AUXV; +mod linux_headers_asm_unistd; +pub use linux_headers_asm_unistd::__NR_io_setup; +pub use linux_headers_asm_unistd::__NR_io_destroy; +pub use linux_headers_asm_unistd::__NR_io_submit; +pub use linux_headers_asm_unistd::__NR_io_cancel; +pub use linux_headers_asm_unistd::__NR_io_getevents; +pub use linux_headers_asm_unistd::__NR_setxattr; +pub use linux_headers_asm_unistd::__NR_lsetxattr; +pub use linux_headers_asm_unistd::__NR_fsetxattr; +pub use linux_headers_asm_unistd::__NR_getxattr; +pub use linux_headers_asm_unistd::__NR_lgetxattr; +pub use linux_headers_asm_unistd::__NR_fgetxattr; +pub use linux_headers_asm_unistd::__NR_listxattr; +pub use linux_headers_asm_unistd::__NR_llistxattr; +pub use linux_headers_asm_unistd::__NR_flistxattr; +pub use linux_headers_asm_unistd::__NR_removexattr; +pub use linux_headers_asm_unistd::__NR_lremovexattr; +pub use linux_headers_asm_unistd::__NR_fremovexattr; +pub use linux_headers_asm_unistd::__NR_getcwd; +pub use linux_headers_asm_unistd::__NR_lookup_dcookie; +pub use linux_headers_asm_unistd::__NR_eventfd2; +pub use linux_headers_asm_unistd::__NR_epoll_create1; +pub use linux_headers_asm_unistd::__NR_epoll_ctl; +pub use linux_headers_asm_unistd::__NR_epoll_pwait; +pub use linux_headers_asm_unistd::__NR_dup; +pub use linux_headers_asm_unistd::__NR_dup3; +pub use linux_headers_asm_unistd::__NR_fcntl; +pub use linux_headers_asm_unistd::__NR_inotify_init1; +pub use linux_headers_asm_unistd::__NR_inotify_add_watch; +pub use linux_headers_asm_unistd::__NR_inotify_rm_watch; +pub use linux_headers_asm_unistd::__NR_ioctl; +pub use linux_headers_asm_unistd::__NR_ioprio_set; +pub use linux_headers_asm_unistd::__NR_ioprio_get; +pub use linux_headers_asm_unistd::__NR_flock; +pub use linux_headers_asm_unistd::__NR_mknodat; +pub use linux_headers_asm_unistd::__NR_mkdirat; +pub use linux_headers_asm_unistd::__NR_unlinkat; +pub use linux_headers_asm_unistd::__NR_symlinkat; +pub use linux_headers_asm_unistd::__NR_linkat; +pub use linux_headers_asm_unistd::__NR_umount2; +pub use linux_headers_asm_unistd::__NR_mount; +pub use linux_headers_asm_unistd::__NR_pivot_root; +pub use linux_headers_asm_unistd::__NR_nfsservctl; +pub use linux_headers_asm_unistd::__NR_statfs; +pub use linux_headers_asm_unistd::__NR_fstatfs; +pub use linux_headers_asm_unistd::__NR_truncate; +pub use linux_headers_asm_unistd::__NR_ftruncate; +pub use linux_headers_asm_unistd::__NR_fallocate; +pub use linux_headers_asm_unistd::__NR_faccessat; +pub use linux_headers_asm_unistd::__NR_chdir; +pub use linux_headers_asm_unistd::__NR_fchdir; +pub use linux_headers_asm_unistd::__NR_chroot; +pub use linux_headers_asm_unistd::__NR_fchmod; +pub use linux_headers_asm_unistd::__NR_fchmodat; +pub use linux_headers_asm_unistd::__NR_fchownat; +pub use linux_headers_asm_unistd::__NR_fchown; +pub use linux_headers_asm_unistd::__NR_openat; +pub use linux_headers_asm_unistd::__NR_close; +pub use linux_headers_asm_unistd::__NR_vhangup; +pub use linux_headers_asm_unistd::__NR_pipe2; +pub use linux_headers_asm_unistd::__NR_quotactl; +pub use linux_headers_asm_unistd::__NR_getdents64; +pub use linux_headers_asm_unistd::__NR_lseek; +pub use linux_headers_asm_unistd::__NR_read; +pub use linux_headers_asm_unistd::__NR_write; +pub use linux_headers_asm_unistd::__NR_readv; +pub use linux_headers_asm_unistd::__NR_writev; +pub use linux_headers_asm_unistd::__NR_pread64; +pub use linux_headers_asm_unistd::__NR_pwrite64; +pub use linux_headers_asm_unistd::__NR_preadv; +pub use linux_headers_asm_unistd::__NR_pwritev; +pub use linux_headers_asm_unistd::__NR_sendfile; +pub use linux_headers_asm_unistd::__NR_pselect6; +pub use linux_headers_asm_unistd::__NR_ppoll; +pub use linux_headers_asm_unistd::__NR_signalfd4; +pub use linux_headers_asm_unistd::__NR_vmsplice; +pub use linux_headers_asm_unistd::__NR_splice; +pub use linux_headers_asm_unistd::__NR_tee; +pub use linux_headers_asm_unistd::__NR_readlinkat; +pub use linux_headers_asm_unistd::__NR_newfstatat; +pub use linux_headers_asm_unistd::__NR_fstat; +pub use linux_headers_asm_unistd::__NR_sync; +pub use linux_headers_asm_unistd::__NR_fsync; +pub use linux_headers_asm_unistd::__NR_fdatasync; +pub use linux_headers_asm_unistd::__NR_sync_file_range; +pub use linux_headers_asm_unistd::__NR_timerfd_create; +pub use linux_headers_asm_unistd::__NR_timerfd_settime; +pub use linux_headers_asm_unistd::__NR_timerfd_gettime; +pub use linux_headers_asm_unistd::__NR_utimensat; +pub use linux_headers_asm_unistd::__NR_acct; +pub use linux_headers_asm_unistd::__NR_capget; +pub use linux_headers_asm_unistd::__NR_capset; +pub use linux_headers_asm_unistd::__NR_personality; +pub use linux_headers_asm_unistd::__NR_exit; +pub use linux_headers_asm_unistd::__NR_exit_group; +pub use linux_headers_asm_unistd::__NR_waitid; +pub use linux_headers_asm_unistd::__NR_set_tid_address; +pub use linux_headers_asm_unistd::__NR_unshare; +pub use linux_headers_asm_unistd::__NR_futex; +pub use linux_headers_asm_unistd::__NR_set_robust_list; +pub use linux_headers_asm_unistd::__NR_get_robust_list; +pub use linux_headers_asm_unistd::__NR_nanosleep; +pub use linux_headers_asm_unistd::__NR_getitimer; +pub use linux_headers_asm_unistd::__NR_setitimer; +pub use linux_headers_asm_unistd::__NR_kexec_load; +pub use linux_headers_asm_unistd::__NR_init_module; +pub use linux_headers_asm_unistd::__NR_delete_module; +pub use linux_headers_asm_unistd::__NR_timer_create; +pub use linux_headers_asm_unistd::__NR_timer_gettime; +pub use linux_headers_asm_unistd::__NR_timer_getoverrun; +pub use linux_headers_asm_unistd::__NR_timer_settime; +pub use linux_headers_asm_unistd::__NR_timer_delete; +pub use linux_headers_asm_unistd::__NR_clock_settime; +pub use linux_headers_asm_unistd::__NR_clock_gettime; +pub use linux_headers_asm_unistd::__NR_clock_getres; +pub use linux_headers_asm_unistd::__NR_clock_nanosleep; +pub use linux_headers_asm_unistd::__NR_syslog; +pub use linux_headers_asm_unistd::__NR_ptrace; +pub use linux_headers_asm_unistd::__NR_sched_setparam; +pub use linux_headers_asm_unistd::__NR_sched_setscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getparam; +pub use linux_headers_asm_unistd::__NR_sched_setaffinity; +pub use linux_headers_asm_unistd::__NR_sched_getaffinity; +pub use linux_headers_asm_unistd::__NR_sched_yield; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_max; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_min; +pub use linux_headers_asm_unistd::__NR_sched_rr_get_interval; +pub use linux_headers_asm_unistd::__NR_restart_syscall; +pub use linux_headers_asm_unistd::__NR_kill; +pub use linux_headers_asm_unistd::__NR_tkill; +pub use linux_headers_asm_unistd::__NR_tgkill; +pub use linux_headers_asm_unistd::__NR_sigaltstack; +pub use linux_headers_asm_unistd::__NR_rt_sigsuspend; +pub use linux_headers_asm_unistd::__NR_rt_sigaction; +pub use linux_headers_asm_unistd::__NR_rt_sigprocmask; +pub use linux_headers_asm_unistd::__NR_rt_sigpending; +pub use linux_headers_asm_unistd::__NR_rt_sigtimedwait; +pub use linux_headers_asm_unistd::__NR_rt_sigqueueinfo; +pub use linux_headers_asm_unistd::__NR_rt_sigreturn; +pub use linux_headers_asm_unistd::__NR_setpriority; +pub use linux_headers_asm_unistd::__NR_getpriority; +pub use linux_headers_asm_unistd::__NR_reboot; +pub use linux_headers_asm_unistd::__NR_setregid; +pub use linux_headers_asm_unistd::__NR_setgid; +pub use linux_headers_asm_unistd::__NR_setreuid; +pub use linux_headers_asm_unistd::__NR_setuid; +pub use linux_headers_asm_unistd::__NR_setresuid; +pub use linux_headers_asm_unistd::__NR_getresuid; +pub use linux_headers_asm_unistd::__NR_setresgid; +pub use linux_headers_asm_unistd::__NR_getresgid; +pub use linux_headers_asm_unistd::__NR_setfsuid; +pub use linux_headers_asm_unistd::__NR_setfsgid; +pub use linux_headers_asm_unistd::__NR_times; +pub use linux_headers_asm_unistd::__NR_setpgid; +pub use linux_headers_asm_unistd::__NR_getpgid; +pub use linux_headers_asm_unistd::__NR_getsid; +pub use linux_headers_asm_unistd::__NR_setsid; +pub use linux_headers_asm_unistd::__NR_getgroups; +pub use linux_headers_asm_unistd::__NR_setgroups; +pub use linux_headers_asm_unistd::__NR_uname; +pub use linux_headers_asm_unistd::__NR_sethostname; +pub use linux_headers_asm_unistd::__NR_setdomainname; +pub use linux_headers_asm_unistd::__NR_getrlimit; +pub use linux_headers_asm_unistd::__NR_setrlimit; +pub use linux_headers_asm_unistd::__NR_getrusage; +pub use linux_headers_asm_unistd::__NR_umask; +pub use linux_headers_asm_unistd::__NR_prctl; +pub use linux_headers_asm_unistd::__NR_getcpu; +pub use linux_headers_asm_unistd::__NR_gettimeofday; +pub use linux_headers_asm_unistd::__NR_settimeofday; +pub use linux_headers_asm_unistd::__NR_adjtimex; +pub use linux_headers_asm_unistd::__NR_getpid; +pub use linux_headers_asm_unistd::__NR_getppid; +pub use linux_headers_asm_unistd::__NR_getuid; +pub use linux_headers_asm_unistd::__NR_geteuid; +pub use linux_headers_asm_unistd::__NR_getgid; +pub use linux_headers_asm_unistd::__NR_getegid; +pub use linux_headers_asm_unistd::__NR_gettid; +pub use linux_headers_asm_unistd::__NR_sysinfo; +pub use linux_headers_asm_unistd::__NR_mq_open; +pub use linux_headers_asm_unistd::__NR_mq_unlink; +pub use linux_headers_asm_unistd::__NR_mq_timedsend; +pub use linux_headers_asm_unistd::__NR_mq_timedreceive; +pub use linux_headers_asm_unistd::__NR_mq_notify; +pub use linux_headers_asm_unistd::__NR_mq_getsetattr; +pub use linux_headers_asm_unistd::__NR_msgget; +pub use linux_headers_asm_unistd::__NR_msgctl; +pub use linux_headers_asm_unistd::__NR_msgrcv; +pub use linux_headers_asm_unistd::__NR_msgsnd; +pub use linux_headers_asm_unistd::__NR_semget; +pub use linux_headers_asm_unistd::__NR_semctl; +pub use linux_headers_asm_unistd::__NR_semtimedop; +pub use linux_headers_asm_unistd::__NR_semop; +pub use linux_headers_asm_unistd::__NR_shmget; +pub use linux_headers_asm_unistd::__NR_shmctl; +pub use linux_headers_asm_unistd::__NR_shmat; +pub use linux_headers_asm_unistd::__NR_shmdt; +pub use linux_headers_asm_unistd::__NR_socket; +pub use linux_headers_asm_unistd::__NR_socketpair; +pub use linux_headers_asm_unistd::__NR_bind; +pub use linux_headers_asm_unistd::__NR_listen; +pub use linux_headers_asm_unistd::__NR_accept; +pub use linux_headers_asm_unistd::__NR_connect; +pub use linux_headers_asm_unistd::__NR_getsockname; +pub use linux_headers_asm_unistd::__NR_getpeername; +pub use linux_headers_asm_unistd::__NR_sendto; +pub use linux_headers_asm_unistd::__NR_recvfrom; +pub use linux_headers_asm_unistd::__NR_setsockopt; +pub use linux_headers_asm_unistd::__NR_getsockopt; +pub use linux_headers_asm_unistd::__NR_shutdown; +pub use linux_headers_asm_unistd::__NR_sendmsg; +pub use linux_headers_asm_unistd::__NR_recvmsg; +pub use linux_headers_asm_unistd::__NR_readahead; +pub use linux_headers_asm_unistd::__NR_brk; +pub use linux_headers_asm_unistd::__NR_munmap; +pub use linux_headers_asm_unistd::__NR_mremap; +pub use linux_headers_asm_unistd::__NR_add_key; +pub use linux_headers_asm_unistd::__NR_request_key; +pub use linux_headers_asm_unistd::__NR_keyctl; +pub use linux_headers_asm_unistd::__NR_clone; +pub use linux_headers_asm_unistd::__NR_execve; +pub use linux_headers_asm_unistd::__NR_mmap; +pub use linux_headers_asm_unistd::__NR_fadvise64; +pub use linux_headers_asm_unistd::__NR_swapon; +pub use linux_headers_asm_unistd::__NR_swapoff; +pub use linux_headers_asm_unistd::__NR_mprotect; +pub use linux_headers_asm_unistd::__NR_msync; +pub use linux_headers_asm_unistd::__NR_mlock; +pub use linux_headers_asm_unistd::__NR_munlock; +pub use linux_headers_asm_unistd::__NR_mlockall; +pub use linux_headers_asm_unistd::__NR_munlockall; +pub use linux_headers_asm_unistd::__NR_mincore; +pub use linux_headers_asm_unistd::__NR_madvise; +pub use linux_headers_asm_unistd::__NR_remap_file_pages; +pub use linux_headers_asm_unistd::__NR_mbind; +pub use linux_headers_asm_unistd::__NR_get_mempolicy; +pub use linux_headers_asm_unistd::__NR_set_mempolicy; +pub use linux_headers_asm_unistd::__NR_migrate_pages; +pub use linux_headers_asm_unistd::__NR_move_pages; +pub use linux_headers_asm_unistd::__NR_rt_tgsigqueueinfo; +pub use linux_headers_asm_unistd::__NR_perf_event_open; +pub use linux_headers_asm_unistd::__NR_accept4; +pub use linux_headers_asm_unistd::__NR_recvmmsg; +pub use linux_headers_asm_unistd::__NR_riscv_hwprobe; +pub use linux_headers_asm_unistd::__NR_riscv_flush_icache; +pub use linux_headers_asm_unistd::__NR_wait4; +pub use linux_headers_asm_unistd::__NR_prlimit64; +pub use linux_headers_asm_unistd::__NR_fanotify_init; +pub use linux_headers_asm_unistd::__NR_fanotify_mark; +pub use linux_headers_asm_unistd::__NR_name_to_handle_at; +pub use linux_headers_asm_unistd::__NR_open_by_handle_at; +pub use linux_headers_asm_unistd::__NR_clock_adjtime; +pub use linux_headers_asm_unistd::__NR_syncfs; +pub use linux_headers_asm_unistd::__NR_setns; +pub use linux_headers_asm_unistd::__NR_sendmmsg; +pub use linux_headers_asm_unistd::__NR_process_vm_readv; +pub use linux_headers_asm_unistd::__NR_process_vm_writev; +pub use linux_headers_asm_unistd::__NR_kcmp; +pub use linux_headers_asm_unistd::__NR_finit_module; +pub use linux_headers_asm_unistd::__NR_sched_setattr; +pub use linux_headers_asm_unistd::__NR_sched_getattr; +pub use linux_headers_asm_unistd::__NR_renameat2; +pub use linux_headers_asm_unistd::__NR_seccomp; +pub use linux_headers_asm_unistd::__NR_getrandom; +pub use linux_headers_asm_unistd::__NR_memfd_create; +pub use linux_headers_asm_unistd::__NR_bpf; +pub use linux_headers_asm_unistd::__NR_execveat; +pub use linux_headers_asm_unistd::__NR_userfaultfd; +pub use linux_headers_asm_unistd::__NR_membarrier; +pub use linux_headers_asm_unistd::__NR_mlock2; +pub use linux_headers_asm_unistd::__NR_copy_file_range; +pub use linux_headers_asm_unistd::__NR_preadv2; +pub use linux_headers_asm_unistd::__NR_pwritev2; +pub use linux_headers_asm_unistd::__NR_pkey_mprotect; +pub use linux_headers_asm_unistd::__NR_pkey_alloc; +pub use linux_headers_asm_unistd::__NR_pkey_free; +pub use linux_headers_asm_unistd::__NR_statx; +pub use linux_headers_asm_unistd::__NR_io_pgetevents; +pub use linux_headers_asm_unistd::__NR_rseq; +pub use linux_headers_asm_unistd::__NR_kexec_file_load; +pub use linux_headers_asm_unistd::__NR_pidfd_send_signal; +pub use linux_headers_asm_unistd::__NR_io_uring_setup; +pub use linux_headers_asm_unistd::__NR_io_uring_enter; +pub use linux_headers_asm_unistd::__NR_io_uring_register; +pub use linux_headers_asm_unistd::__NR_open_tree; +pub use linux_headers_asm_unistd::__NR_move_mount; +pub use linux_headers_asm_unistd::__NR_fsopen; +pub use linux_headers_asm_unistd::__NR_fsconfig; +pub use linux_headers_asm_unistd::__NR_fsmount; +pub use linux_headers_asm_unistd::__NR_fspick; +pub use linux_headers_asm_unistd::__NR_pidfd_open; +pub use linux_headers_asm_unistd::__NR_clone3; +pub use linux_headers_asm_unistd::__NR_close_range; +pub use linux_headers_asm_unistd::__NR_openat2; +pub use linux_headers_asm_unistd::__NR_pidfd_getfd; +pub use linux_headers_asm_unistd::__NR_faccessat2; +pub use linux_headers_asm_unistd::__NR_process_madvise; +pub use linux_headers_asm_unistd::__NR_epoll_pwait2; +pub use linux_headers_asm_unistd::__NR_mount_setattr; +pub use linux_headers_asm_unistd::__NR_quotactl_fd; +pub use linux_headers_asm_unistd::__NR_landlock_create_ruleset; +pub use linux_headers_asm_unistd::__NR_landlock_add_rule; +pub use linux_headers_asm_unistd::__NR_landlock_restrict_self; +pub use linux_headers_asm_unistd::__NR_memfd_secret; +pub use linux_headers_asm_unistd::__NR_process_mrelease; +pub use linux_headers_asm_unistd::__NR_futex_waitv; +pub use linux_headers_asm_unistd::__NR_set_mempolicy_home_node; +pub use linux_headers_asm_unistd::__NR_cachestat; +pub use linux_headers_asm_unistd::__NR_fchmodat2; +pub use linux_headers_asm_unistd::__NR_map_shadow_stack; +pub use linux_headers_asm_unistd::__NR_futex_wake; +pub use linux_headers_asm_unistd::__NR_futex_wait; +pub use linux_headers_asm_unistd::__NR_futex_requeue; +pub use linux_headers_asm_unistd::__NR_statmount; +pub use linux_headers_asm_unistd::__NR_listmount; +pub use linux_headers_asm_unistd::__NR_lsm_get_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_set_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_list_modules; +pub use linux_headers_asm_unistd::__NR_mseal; +mod linux_headers_asm_hwprobe; +pub use linux_headers_asm_hwprobe::riscv_hwprobe; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MVENDORID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MARCHID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MIMPID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_BASE_BEHAVIOR; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_BASE_BEHAVIOR_IMA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_IMA_EXT_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_FD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_C; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_V; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICBOZ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKX; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKG; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTNTL; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZTSO; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZACAS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICOND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTPAUSE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64D; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZAWRS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_CPUPERF_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_MASK; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_TIME_CSR_FREQ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_WHICH_CPUS; +mod sys_auxv; +pub use sys_auxv::getauxval; +mod elf; +pub use elf::Elf32_auxv_t; +pub use elf::Elf64_auxv_t; +pub type c_char = u8; diff --git a/tests/helper/src/gen/sys/riscv64_linux_android/sys_auxv.rs b/tests/helper/src/gen/sys/riscv64_linux_android/sys_auxv.rs new file mode 100644 index 000000000..aeae85616 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64_linux_android/sys_auxv.rs @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +extern "C" { + pub fn getauxval(__type: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; +} diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/elf.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/elf.rs new file mode 100644 index 000000000..cc057e901 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/elf.rs @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf32_auxv_t { + pub a_type: u32, + pub a_un: Elf32_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf32_auxv_t__bindgen_ty_1 { + pub a_val: u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf64_auxv_t { + pub a_type: u64, + pub a_un: Elf64_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf64_auxv_t__bindgen_ty_1 { + pub a_val: u64, +} diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_hwprobe.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_hwprobe.rs new file mode 100644 index 000000000..ee3d3d307 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_hwprobe.rs @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct riscv_hwprobe { + pub key: __s64, + pub value: __u64, +} +pub const RISCV_HWPROBE_KEY_MVENDORID: u32 = 0; +pub const RISCV_HWPROBE_KEY_MARCHID: u32 = 1; +pub const RISCV_HWPROBE_KEY_MIMPID: u32 = 2; +pub const RISCV_HWPROBE_KEY_BASE_BEHAVIOR: u32 = 3; +pub const RISCV_HWPROBE_BASE_BEHAVIOR_IMA: u32 = 1; +pub const RISCV_HWPROBE_KEY_IMA_EXT_0: u32 = 4; +pub const RISCV_HWPROBE_IMA_FD: u32 = 1; +pub const RISCV_HWPROBE_IMA_C: u32 = 2; +pub const RISCV_HWPROBE_IMA_V: u32 = 4; +pub const RISCV_HWPROBE_EXT_ZBA: u32 = 8; +pub const RISCV_HWPROBE_EXT_ZBB: u32 = 16; +pub const RISCV_HWPROBE_EXT_ZBS: u32 = 32; +pub const RISCV_HWPROBE_EXT_ZICBOZ: u32 = 64; +pub const RISCV_HWPROBE_EXT_ZBC: u32 = 128; +pub const RISCV_HWPROBE_EXT_ZBKB: u32 = 256; +pub const RISCV_HWPROBE_EXT_ZBKC: u32 = 512; +pub const RISCV_HWPROBE_EXT_ZBKX: u32 = 1024; +pub const RISCV_HWPROBE_EXT_ZKND: u32 = 2048; +pub const RISCV_HWPROBE_EXT_ZKNE: u32 = 4096; +pub const RISCV_HWPROBE_EXT_ZKNH: u32 = 8192; +pub const RISCV_HWPROBE_EXT_ZKSED: u32 = 16384; +pub const RISCV_HWPROBE_EXT_ZKSH: u32 = 32768; +pub const RISCV_HWPROBE_EXT_ZKT: u32 = 65536; +pub const RISCV_HWPROBE_EXT_ZVBB: u32 = 131072; +pub const RISCV_HWPROBE_EXT_ZVBC: u32 = 262144; +pub const RISCV_HWPROBE_EXT_ZVKB: u32 = 524288; +pub const RISCV_HWPROBE_EXT_ZVKG: u32 = 1048576; +pub const RISCV_HWPROBE_EXT_ZVKNED: u32 = 2097152; +pub const RISCV_HWPROBE_EXT_ZVKNHA: u32 = 4194304; +pub const RISCV_HWPROBE_EXT_ZVKNHB: u32 = 8388608; +pub const RISCV_HWPROBE_EXT_ZVKSED: u32 = 16777216; +pub const RISCV_HWPROBE_EXT_ZVKSH: u32 = 33554432; +pub const RISCV_HWPROBE_EXT_ZVKT: u32 = 67108864; +pub const RISCV_HWPROBE_EXT_ZFH: u32 = 134217728; +pub const RISCV_HWPROBE_EXT_ZFHMIN: u32 = 268435456; +pub const RISCV_HWPROBE_EXT_ZIHINTNTL: u32 = 536870912; +pub const RISCV_HWPROBE_EXT_ZVFH: u32 = 1073741824; +pub const RISCV_HWPROBE_EXT_ZVFHMIN: u32 = 2147483648; +pub const RISCV_HWPROBE_EXT_ZFA: u64 = 4294967296; +pub const RISCV_HWPROBE_EXT_ZTSO: u64 = 8589934592; +pub const RISCV_HWPROBE_EXT_ZACAS: u64 = 17179869184; +pub const RISCV_HWPROBE_EXT_ZICOND: u64 = 34359738368; +pub const RISCV_HWPROBE_EXT_ZIHINTPAUSE: u64 = 68719476736; +pub const RISCV_HWPROBE_EXT_ZVE32X: u64 = 137438953472; +pub const RISCV_HWPROBE_EXT_ZVE32F: u64 = 274877906944; +pub const RISCV_HWPROBE_EXT_ZVE64X: u64 = 549755813888; +pub const RISCV_HWPROBE_EXT_ZVE64F: u64 = 1099511627776; +pub const RISCV_HWPROBE_EXT_ZVE64D: u64 = 2199023255552; +pub const RISCV_HWPROBE_EXT_ZIMOP: u64 = 4398046511104; +pub const RISCV_HWPROBE_EXT_ZCA: u64 = 8796093022208; +pub const RISCV_HWPROBE_EXT_ZCB: u64 = 17592186044416; +pub const RISCV_HWPROBE_EXT_ZCD: u64 = 35184372088832; +pub const RISCV_HWPROBE_EXT_ZCF: u64 = 70368744177664; +pub const RISCV_HWPROBE_EXT_ZCMOP: u64 = 140737488355328; +pub const RISCV_HWPROBE_EXT_ZAWRS: u64 = 281474976710656; +pub const RISCV_HWPROBE_KEY_CPUPERF_0: u32 = 5; +pub const RISCV_HWPROBE_MISALIGNED_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_MISALIGNED_MASK: u32 = 7; +pub const RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE: u32 = 6; +pub const RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS: u32 = 7; +pub const RISCV_HWPROBE_KEY_TIME_CSR_FREQ: u32 = 8; +pub const RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF: u32 = 9; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_WHICH_CPUS: u32 = 1; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_unistd.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_unistd.rs new file mode 100644 index 000000000..a2c4d4729 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_asm_unistd.rs @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const __NR_io_setup: u32 = 0; +pub const __NR_io_destroy: u32 = 1; +pub const __NR_io_submit: u32 = 2; +pub const __NR_io_cancel: u32 = 3; +pub const __NR_io_getevents: u32 = 4; +pub const __NR_setxattr: u32 = 5; +pub const __NR_lsetxattr: u32 = 6; +pub const __NR_fsetxattr: u32 = 7; +pub const __NR_getxattr: u32 = 8; +pub const __NR_lgetxattr: u32 = 9; +pub const __NR_fgetxattr: u32 = 10; +pub const __NR_listxattr: u32 = 11; +pub const __NR_llistxattr: u32 = 12; +pub const __NR_flistxattr: u32 = 13; +pub const __NR_removexattr: u32 = 14; +pub const __NR_lremovexattr: u32 = 15; +pub const __NR_fremovexattr: u32 = 16; +pub const __NR_getcwd: u32 = 17; +pub const __NR_lookup_dcookie: u32 = 18; +pub const __NR_eventfd2: u32 = 19; +pub const __NR_epoll_create1: u32 = 20; +pub const __NR_epoll_ctl: u32 = 21; +pub const __NR_epoll_pwait: u32 = 22; +pub const __NR_dup: u32 = 23; +pub const __NR_dup3: u32 = 24; +pub const __NR_fcntl: u32 = 25; +pub const __NR_inotify_init1: u32 = 26; +pub const __NR_inotify_add_watch: u32 = 27; +pub const __NR_inotify_rm_watch: u32 = 28; +pub const __NR_ioctl: u32 = 29; +pub const __NR_ioprio_set: u32 = 30; +pub const __NR_ioprio_get: u32 = 31; +pub const __NR_flock: u32 = 32; +pub const __NR_mknodat: u32 = 33; +pub const __NR_mkdirat: u32 = 34; +pub const __NR_unlinkat: u32 = 35; +pub const __NR_symlinkat: u32 = 36; +pub const __NR_linkat: u32 = 37; +pub const __NR_umount2: u32 = 39; +pub const __NR_mount: u32 = 40; +pub const __NR_pivot_root: u32 = 41; +pub const __NR_nfsservctl: u32 = 42; +pub const __NR_statfs: u32 = 43; +pub const __NR_fstatfs: u32 = 44; +pub const __NR_truncate: u32 = 45; +pub const __NR_ftruncate: u32 = 46; +pub const __NR_fallocate: u32 = 47; +pub const __NR_faccessat: u32 = 48; +pub const __NR_chdir: u32 = 49; +pub const __NR_fchdir: u32 = 50; +pub const __NR_chroot: u32 = 51; +pub const __NR_fchmod: u32 = 52; +pub const __NR_fchmodat: u32 = 53; +pub const __NR_fchownat: u32 = 54; +pub const __NR_fchown: u32 = 55; +pub const __NR_openat: u32 = 56; +pub const __NR_close: u32 = 57; +pub const __NR_vhangup: u32 = 58; +pub const __NR_pipe2: u32 = 59; +pub const __NR_quotactl: u32 = 60; +pub const __NR_getdents64: u32 = 61; +pub const __NR_lseek: u32 = 62; +pub const __NR_read: u32 = 63; +pub const __NR_write: u32 = 64; +pub const __NR_readv: u32 = 65; +pub const __NR_writev: u32 = 66; +pub const __NR_pread64: u32 = 67; +pub const __NR_pwrite64: u32 = 68; +pub const __NR_preadv: u32 = 69; +pub const __NR_pwritev: u32 = 70; +pub const __NR_sendfile: u32 = 71; +pub const __NR_pselect6: u32 = 72; +pub const __NR_ppoll: u32 = 73; +pub const __NR_signalfd4: u32 = 74; +pub const __NR_vmsplice: u32 = 75; +pub const __NR_splice: u32 = 76; +pub const __NR_tee: u32 = 77; +pub const __NR_readlinkat: u32 = 78; +pub const __NR_newfstatat: u32 = 79; +pub const __NR_fstat: u32 = 80; +pub const __NR_sync: u32 = 81; +pub const __NR_fsync: u32 = 82; +pub const __NR_fdatasync: u32 = 83; +pub const __NR_sync_file_range: u32 = 84; +pub const __NR_timerfd_create: u32 = 85; +pub const __NR_timerfd_settime: u32 = 86; +pub const __NR_timerfd_gettime: u32 = 87; +pub const __NR_utimensat: u32 = 88; +pub const __NR_acct: u32 = 89; +pub const __NR_capget: u32 = 90; +pub const __NR_capset: u32 = 91; +pub const __NR_personality: u32 = 92; +pub const __NR_exit: u32 = 93; +pub const __NR_exit_group: u32 = 94; +pub const __NR_waitid: u32 = 95; +pub const __NR_set_tid_address: u32 = 96; +pub const __NR_unshare: u32 = 97; +pub const __NR_futex: u32 = 98; +pub const __NR_set_robust_list: u32 = 99; +pub const __NR_get_robust_list: u32 = 100; +pub const __NR_nanosleep: u32 = 101; +pub const __NR_getitimer: u32 = 102; +pub const __NR_setitimer: u32 = 103; +pub const __NR_kexec_load: u32 = 104; +pub const __NR_init_module: u32 = 105; +pub const __NR_delete_module: u32 = 106; +pub const __NR_timer_create: u32 = 107; +pub const __NR_timer_gettime: u32 = 108; +pub const __NR_timer_getoverrun: u32 = 109; +pub const __NR_timer_settime: u32 = 110; +pub const __NR_timer_delete: u32 = 111; +pub const __NR_clock_settime: u32 = 112; +pub const __NR_clock_gettime: u32 = 113; +pub const __NR_clock_getres: u32 = 114; +pub const __NR_clock_nanosleep: u32 = 115; +pub const __NR_syslog: u32 = 116; +pub const __NR_ptrace: u32 = 117; +pub const __NR_sched_setparam: u32 = 118; +pub const __NR_sched_setscheduler: u32 = 119; +pub const __NR_sched_getscheduler: u32 = 120; +pub const __NR_sched_getparam: u32 = 121; +pub const __NR_sched_setaffinity: u32 = 122; +pub const __NR_sched_getaffinity: u32 = 123; +pub const __NR_sched_yield: u32 = 124; +pub const __NR_sched_get_priority_max: u32 = 125; +pub const __NR_sched_get_priority_min: u32 = 126; +pub const __NR_sched_rr_get_interval: u32 = 127; +pub const __NR_restart_syscall: u32 = 128; +pub const __NR_kill: u32 = 129; +pub const __NR_tkill: u32 = 130; +pub const __NR_tgkill: u32 = 131; +pub const __NR_sigaltstack: u32 = 132; +pub const __NR_rt_sigsuspend: u32 = 133; +pub const __NR_rt_sigaction: u32 = 134; +pub const __NR_rt_sigprocmask: u32 = 135; +pub const __NR_rt_sigpending: u32 = 136; +pub const __NR_rt_sigtimedwait: u32 = 137; +pub const __NR_rt_sigqueueinfo: u32 = 138; +pub const __NR_rt_sigreturn: u32 = 139; +pub const __NR_setpriority: u32 = 140; +pub const __NR_getpriority: u32 = 141; +pub const __NR_reboot: u32 = 142; +pub const __NR_setregid: u32 = 143; +pub const __NR_setgid: u32 = 144; +pub const __NR_setreuid: u32 = 145; +pub const __NR_setuid: u32 = 146; +pub const __NR_setresuid: u32 = 147; +pub const __NR_getresuid: u32 = 148; +pub const __NR_setresgid: u32 = 149; +pub const __NR_getresgid: u32 = 150; +pub const __NR_setfsuid: u32 = 151; +pub const __NR_setfsgid: u32 = 152; +pub const __NR_times: u32 = 153; +pub const __NR_setpgid: u32 = 154; +pub const __NR_getpgid: u32 = 155; +pub const __NR_getsid: u32 = 156; +pub const __NR_setsid: u32 = 157; +pub const __NR_getgroups: u32 = 158; +pub const __NR_setgroups: u32 = 159; +pub const __NR_uname: u32 = 160; +pub const __NR_sethostname: u32 = 161; +pub const __NR_setdomainname: u32 = 162; +pub const __NR_getrlimit: u32 = 163; +pub const __NR_setrlimit: u32 = 164; +pub const __NR_getrusage: u32 = 165; +pub const __NR_umask: u32 = 166; +pub const __NR_prctl: u32 = 167; +pub const __NR_getcpu: u32 = 168; +pub const __NR_gettimeofday: u32 = 169; +pub const __NR_settimeofday: u32 = 170; +pub const __NR_adjtimex: u32 = 171; +pub const __NR_getpid: u32 = 172; +pub const __NR_getppid: u32 = 173; +pub const __NR_getuid: u32 = 174; +pub const __NR_geteuid: u32 = 175; +pub const __NR_getgid: u32 = 176; +pub const __NR_getegid: u32 = 177; +pub const __NR_gettid: u32 = 178; +pub const __NR_sysinfo: u32 = 179; +pub const __NR_mq_open: u32 = 180; +pub const __NR_mq_unlink: u32 = 181; +pub const __NR_mq_timedsend: u32 = 182; +pub const __NR_mq_timedreceive: u32 = 183; +pub const __NR_mq_notify: u32 = 184; +pub const __NR_mq_getsetattr: u32 = 185; +pub const __NR_msgget: u32 = 186; +pub const __NR_msgctl: u32 = 187; +pub const __NR_msgrcv: u32 = 188; +pub const __NR_msgsnd: u32 = 189; +pub const __NR_semget: u32 = 190; +pub const __NR_semctl: u32 = 191; +pub const __NR_semtimedop: u32 = 192; +pub const __NR_semop: u32 = 193; +pub const __NR_shmget: u32 = 194; +pub const __NR_shmctl: u32 = 195; +pub const __NR_shmat: u32 = 196; +pub const __NR_shmdt: u32 = 197; +pub const __NR_socket: u32 = 198; +pub const __NR_socketpair: u32 = 199; +pub const __NR_bind: u32 = 200; +pub const __NR_listen: u32 = 201; +pub const __NR_accept: u32 = 202; +pub const __NR_connect: u32 = 203; +pub const __NR_getsockname: u32 = 204; +pub const __NR_getpeername: u32 = 205; +pub const __NR_sendto: u32 = 206; +pub const __NR_recvfrom: u32 = 207; +pub const __NR_setsockopt: u32 = 208; +pub const __NR_getsockopt: u32 = 209; +pub const __NR_shutdown: u32 = 210; +pub const __NR_sendmsg: u32 = 211; +pub const __NR_recvmsg: u32 = 212; +pub const __NR_readahead: u32 = 213; +pub const __NR_brk: u32 = 214; +pub const __NR_munmap: u32 = 215; +pub const __NR_mremap: u32 = 216; +pub const __NR_add_key: u32 = 217; +pub const __NR_request_key: u32 = 218; +pub const __NR_keyctl: u32 = 219; +pub const __NR_clone: u32 = 220; +pub const __NR_execve: u32 = 221; +pub const __NR_mmap: u32 = 222; +pub const __NR_fadvise64: u32 = 223; +pub const __NR_swapon: u32 = 224; +pub const __NR_swapoff: u32 = 225; +pub const __NR_mprotect: u32 = 226; +pub const __NR_msync: u32 = 227; +pub const __NR_mlock: u32 = 228; +pub const __NR_munlock: u32 = 229; +pub const __NR_mlockall: u32 = 230; +pub const __NR_munlockall: u32 = 231; +pub const __NR_mincore: u32 = 232; +pub const __NR_madvise: u32 = 233; +pub const __NR_remap_file_pages: u32 = 234; +pub const __NR_mbind: u32 = 235; +pub const __NR_get_mempolicy: u32 = 236; +pub const __NR_set_mempolicy: u32 = 237; +pub const __NR_migrate_pages: u32 = 238; +pub const __NR_move_pages: u32 = 239; +pub const __NR_rt_tgsigqueueinfo: u32 = 240; +pub const __NR_perf_event_open: u32 = 241; +pub const __NR_accept4: u32 = 242; +pub const __NR_recvmmsg: u32 = 243; +pub const __NR_riscv_hwprobe: u32 = 258; +pub const __NR_riscv_flush_icache: u32 = 259; +pub const __NR_wait4: u32 = 260; +pub const __NR_prlimit64: u32 = 261; +pub const __NR_fanotify_init: u32 = 262; +pub const __NR_fanotify_mark: u32 = 263; +pub const __NR_name_to_handle_at: u32 = 264; +pub const __NR_open_by_handle_at: u32 = 265; +pub const __NR_clock_adjtime: u32 = 266; +pub const __NR_syncfs: u32 = 267; +pub const __NR_setns: u32 = 268; +pub const __NR_sendmmsg: u32 = 269; +pub const __NR_process_vm_readv: u32 = 270; +pub const __NR_process_vm_writev: u32 = 271; +pub const __NR_kcmp: u32 = 272; +pub const __NR_finit_module: u32 = 273; +pub const __NR_sched_setattr: u32 = 274; +pub const __NR_sched_getattr: u32 = 275; +pub const __NR_renameat2: u32 = 276; +pub const __NR_seccomp: u32 = 277; +pub const __NR_getrandom: u32 = 278; +pub const __NR_memfd_create: u32 = 279; +pub const __NR_bpf: u32 = 280; +pub const __NR_execveat: u32 = 281; +pub const __NR_userfaultfd: u32 = 282; +pub const __NR_membarrier: u32 = 283; +pub const __NR_mlock2: u32 = 284; +pub const __NR_copy_file_range: u32 = 285; +pub const __NR_preadv2: u32 = 286; +pub const __NR_pwritev2: u32 = 287; +pub const __NR_pkey_mprotect: u32 = 288; +pub const __NR_pkey_alloc: u32 = 289; +pub const __NR_pkey_free: u32 = 290; +pub const __NR_statx: u32 = 291; +pub const __NR_io_pgetevents: u32 = 292; +pub const __NR_rseq: u32 = 293; +pub const __NR_kexec_file_load: u32 = 294; +pub const __NR_pidfd_send_signal: u32 = 424; +pub const __NR_io_uring_setup: u32 = 425; +pub const __NR_io_uring_enter: u32 = 426; +pub const __NR_io_uring_register: u32 = 427; +pub const __NR_open_tree: u32 = 428; +pub const __NR_move_mount: u32 = 429; +pub const __NR_fsopen: u32 = 430; +pub const __NR_fsconfig: u32 = 431; +pub const __NR_fsmount: u32 = 432; +pub const __NR_fspick: u32 = 433; +pub const __NR_pidfd_open: u32 = 434; +pub const __NR_clone3: u32 = 435; +pub const __NR_close_range: u32 = 436; +pub const __NR_openat2: u32 = 437; +pub const __NR_pidfd_getfd: u32 = 438; +pub const __NR_faccessat2: u32 = 439; +pub const __NR_process_madvise: u32 = 440; +pub const __NR_epoll_pwait2: u32 = 441; +pub const __NR_mount_setattr: u32 = 442; +pub const __NR_quotactl_fd: u32 = 443; +pub const __NR_landlock_create_ruleset: u32 = 444; +pub const __NR_landlock_add_rule: u32 = 445; +pub const __NR_landlock_restrict_self: u32 = 446; +pub const __NR_memfd_secret: u32 = 447; +pub const __NR_process_mrelease: u32 = 448; +pub const __NR_futex_waitv: u32 = 449; +pub const __NR_set_mempolicy_home_node: u32 = 450; +pub const __NR_cachestat: u32 = 451; +pub const __NR_fchmodat2: u32 = 452; +pub const __NR_map_shadow_stack: u32 = 453; +pub const __NR_futex_wake: u32 = 454; +pub const __NR_futex_wait: u32 = 455; +pub const __NR_futex_requeue: u32 = 456; +pub const __NR_statmount: u32 = 457; +pub const __NR_listmount: u32 = 458; +pub const __NR_lsm_get_self_attr: u32 = 459; +pub const __NR_lsm_set_self_attr: u32 = 460; +pub const __NR_lsm_list_modules: u32 = 461; +pub const __NR_mseal: u32 = 462; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_auxvec.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_auxvec.rs new file mode 100644 index 000000000..2b4a98bea --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_auxvec.rs @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const AT_HWCAP: u32 = 16; +pub const AT_HWCAP2: u32 = 26; +pub const AT_HWCAP3: u32 = 29; +pub const AT_HWCAP4: u32 = 30; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_prctl.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_prctl.rs new file mode 100644 index 000000000..0d4c45c68 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/linux_headers_linux_prctl.rs @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const PR_GET_AUXV: u32 = 1096112214; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/mod.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/mod.rs new file mode 100644 index 000000000..88c31bbaf --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/mod.rs @@ -0,0 +1,413 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +#![cfg_attr(rustfmt, rustfmt::skip)] +mod linux_headers_linux_auxvec; +pub use linux_headers_linux_auxvec::AT_HWCAP; +pub use linux_headers_linux_auxvec::AT_HWCAP2; +pub use linux_headers_linux_auxvec::AT_HWCAP3; +pub use linux_headers_linux_auxvec::AT_HWCAP4; +mod linux_headers_linux_prctl; +pub use linux_headers_linux_prctl::PR_GET_AUXV; +mod linux_headers_asm_unistd; +pub use linux_headers_asm_unistd::__NR_io_setup; +pub use linux_headers_asm_unistd::__NR_io_destroy; +pub use linux_headers_asm_unistd::__NR_io_submit; +pub use linux_headers_asm_unistd::__NR_io_cancel; +pub use linux_headers_asm_unistd::__NR_io_getevents; +pub use linux_headers_asm_unistd::__NR_setxattr; +pub use linux_headers_asm_unistd::__NR_lsetxattr; +pub use linux_headers_asm_unistd::__NR_fsetxattr; +pub use linux_headers_asm_unistd::__NR_getxattr; +pub use linux_headers_asm_unistd::__NR_lgetxattr; +pub use linux_headers_asm_unistd::__NR_fgetxattr; +pub use linux_headers_asm_unistd::__NR_listxattr; +pub use linux_headers_asm_unistd::__NR_llistxattr; +pub use linux_headers_asm_unistd::__NR_flistxattr; +pub use linux_headers_asm_unistd::__NR_removexattr; +pub use linux_headers_asm_unistd::__NR_lremovexattr; +pub use linux_headers_asm_unistd::__NR_fremovexattr; +pub use linux_headers_asm_unistd::__NR_getcwd; +pub use linux_headers_asm_unistd::__NR_lookup_dcookie; +pub use linux_headers_asm_unistd::__NR_eventfd2; +pub use linux_headers_asm_unistd::__NR_epoll_create1; +pub use linux_headers_asm_unistd::__NR_epoll_ctl; +pub use linux_headers_asm_unistd::__NR_epoll_pwait; +pub use linux_headers_asm_unistd::__NR_dup; +pub use linux_headers_asm_unistd::__NR_dup3; +pub use linux_headers_asm_unistd::__NR_fcntl; +pub use linux_headers_asm_unistd::__NR_inotify_init1; +pub use linux_headers_asm_unistd::__NR_inotify_add_watch; +pub use linux_headers_asm_unistd::__NR_inotify_rm_watch; +pub use linux_headers_asm_unistd::__NR_ioctl; +pub use linux_headers_asm_unistd::__NR_ioprio_set; +pub use linux_headers_asm_unistd::__NR_ioprio_get; +pub use linux_headers_asm_unistd::__NR_flock; +pub use linux_headers_asm_unistd::__NR_mknodat; +pub use linux_headers_asm_unistd::__NR_mkdirat; +pub use linux_headers_asm_unistd::__NR_unlinkat; +pub use linux_headers_asm_unistd::__NR_symlinkat; +pub use linux_headers_asm_unistd::__NR_linkat; +pub use linux_headers_asm_unistd::__NR_umount2; +pub use linux_headers_asm_unistd::__NR_mount; +pub use linux_headers_asm_unistd::__NR_pivot_root; +pub use linux_headers_asm_unistd::__NR_nfsservctl; +pub use linux_headers_asm_unistd::__NR_statfs; +pub use linux_headers_asm_unistd::__NR_fstatfs; +pub use linux_headers_asm_unistd::__NR_truncate; +pub use linux_headers_asm_unistd::__NR_ftruncate; +pub use linux_headers_asm_unistd::__NR_fallocate; +pub use linux_headers_asm_unistd::__NR_faccessat; +pub use linux_headers_asm_unistd::__NR_chdir; +pub use linux_headers_asm_unistd::__NR_fchdir; +pub use linux_headers_asm_unistd::__NR_chroot; +pub use linux_headers_asm_unistd::__NR_fchmod; +pub use linux_headers_asm_unistd::__NR_fchmodat; +pub use linux_headers_asm_unistd::__NR_fchownat; +pub use linux_headers_asm_unistd::__NR_fchown; +pub use linux_headers_asm_unistd::__NR_openat; +pub use linux_headers_asm_unistd::__NR_close; +pub use linux_headers_asm_unistd::__NR_vhangup; +pub use linux_headers_asm_unistd::__NR_pipe2; +pub use linux_headers_asm_unistd::__NR_quotactl; +pub use linux_headers_asm_unistd::__NR_getdents64; +pub use linux_headers_asm_unistd::__NR_lseek; +pub use linux_headers_asm_unistd::__NR_read; +pub use linux_headers_asm_unistd::__NR_write; +pub use linux_headers_asm_unistd::__NR_readv; +pub use linux_headers_asm_unistd::__NR_writev; +pub use linux_headers_asm_unistd::__NR_pread64; +pub use linux_headers_asm_unistd::__NR_pwrite64; +pub use linux_headers_asm_unistd::__NR_preadv; +pub use linux_headers_asm_unistd::__NR_pwritev; +pub use linux_headers_asm_unistd::__NR_sendfile; +pub use linux_headers_asm_unistd::__NR_pselect6; +pub use linux_headers_asm_unistd::__NR_ppoll; +pub use linux_headers_asm_unistd::__NR_signalfd4; +pub use linux_headers_asm_unistd::__NR_vmsplice; +pub use linux_headers_asm_unistd::__NR_splice; +pub use linux_headers_asm_unistd::__NR_tee; +pub use linux_headers_asm_unistd::__NR_readlinkat; +pub use linux_headers_asm_unistd::__NR_newfstatat; +pub use linux_headers_asm_unistd::__NR_fstat; +pub use linux_headers_asm_unistd::__NR_sync; +pub use linux_headers_asm_unistd::__NR_fsync; +pub use linux_headers_asm_unistd::__NR_fdatasync; +pub use linux_headers_asm_unistd::__NR_sync_file_range; +pub use linux_headers_asm_unistd::__NR_timerfd_create; +pub use linux_headers_asm_unistd::__NR_timerfd_settime; +pub use linux_headers_asm_unistd::__NR_timerfd_gettime; +pub use linux_headers_asm_unistd::__NR_utimensat; +pub use linux_headers_asm_unistd::__NR_acct; +pub use linux_headers_asm_unistd::__NR_capget; +pub use linux_headers_asm_unistd::__NR_capset; +pub use linux_headers_asm_unistd::__NR_personality; +pub use linux_headers_asm_unistd::__NR_exit; +pub use linux_headers_asm_unistd::__NR_exit_group; +pub use linux_headers_asm_unistd::__NR_waitid; +pub use linux_headers_asm_unistd::__NR_set_tid_address; +pub use linux_headers_asm_unistd::__NR_unshare; +pub use linux_headers_asm_unistd::__NR_futex; +pub use linux_headers_asm_unistd::__NR_set_robust_list; +pub use linux_headers_asm_unistd::__NR_get_robust_list; +pub use linux_headers_asm_unistd::__NR_nanosleep; +pub use linux_headers_asm_unistd::__NR_getitimer; +pub use linux_headers_asm_unistd::__NR_setitimer; +pub use linux_headers_asm_unistd::__NR_kexec_load; +pub use linux_headers_asm_unistd::__NR_init_module; +pub use linux_headers_asm_unistd::__NR_delete_module; +pub use linux_headers_asm_unistd::__NR_timer_create; +pub use linux_headers_asm_unistd::__NR_timer_gettime; +pub use linux_headers_asm_unistd::__NR_timer_getoverrun; +pub use linux_headers_asm_unistd::__NR_timer_settime; +pub use linux_headers_asm_unistd::__NR_timer_delete; +pub use linux_headers_asm_unistd::__NR_clock_settime; +pub use linux_headers_asm_unistd::__NR_clock_gettime; +pub use linux_headers_asm_unistd::__NR_clock_getres; +pub use linux_headers_asm_unistd::__NR_clock_nanosleep; +pub use linux_headers_asm_unistd::__NR_syslog; +pub use linux_headers_asm_unistd::__NR_ptrace; +pub use linux_headers_asm_unistd::__NR_sched_setparam; +pub use linux_headers_asm_unistd::__NR_sched_setscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getparam; +pub use linux_headers_asm_unistd::__NR_sched_setaffinity; +pub use linux_headers_asm_unistd::__NR_sched_getaffinity; +pub use linux_headers_asm_unistd::__NR_sched_yield; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_max; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_min; +pub use linux_headers_asm_unistd::__NR_sched_rr_get_interval; +pub use linux_headers_asm_unistd::__NR_restart_syscall; +pub use linux_headers_asm_unistd::__NR_kill; +pub use linux_headers_asm_unistd::__NR_tkill; +pub use linux_headers_asm_unistd::__NR_tgkill; +pub use linux_headers_asm_unistd::__NR_sigaltstack; +pub use linux_headers_asm_unistd::__NR_rt_sigsuspend; +pub use linux_headers_asm_unistd::__NR_rt_sigaction; +pub use linux_headers_asm_unistd::__NR_rt_sigprocmask; +pub use linux_headers_asm_unistd::__NR_rt_sigpending; +pub use linux_headers_asm_unistd::__NR_rt_sigtimedwait; +pub use linux_headers_asm_unistd::__NR_rt_sigqueueinfo; +pub use linux_headers_asm_unistd::__NR_rt_sigreturn; +pub use linux_headers_asm_unistd::__NR_setpriority; +pub use linux_headers_asm_unistd::__NR_getpriority; +pub use linux_headers_asm_unistd::__NR_reboot; +pub use linux_headers_asm_unistd::__NR_setregid; +pub use linux_headers_asm_unistd::__NR_setgid; +pub use linux_headers_asm_unistd::__NR_setreuid; +pub use linux_headers_asm_unistd::__NR_setuid; +pub use linux_headers_asm_unistd::__NR_setresuid; +pub use linux_headers_asm_unistd::__NR_getresuid; +pub use linux_headers_asm_unistd::__NR_setresgid; +pub use linux_headers_asm_unistd::__NR_getresgid; +pub use linux_headers_asm_unistd::__NR_setfsuid; +pub use linux_headers_asm_unistd::__NR_setfsgid; +pub use linux_headers_asm_unistd::__NR_times; +pub use linux_headers_asm_unistd::__NR_setpgid; +pub use linux_headers_asm_unistd::__NR_getpgid; +pub use linux_headers_asm_unistd::__NR_getsid; +pub use linux_headers_asm_unistd::__NR_setsid; +pub use linux_headers_asm_unistd::__NR_getgroups; +pub use linux_headers_asm_unistd::__NR_setgroups; +pub use linux_headers_asm_unistd::__NR_uname; +pub use linux_headers_asm_unistd::__NR_sethostname; +pub use linux_headers_asm_unistd::__NR_setdomainname; +pub use linux_headers_asm_unistd::__NR_getrlimit; +pub use linux_headers_asm_unistd::__NR_setrlimit; +pub use linux_headers_asm_unistd::__NR_getrusage; +pub use linux_headers_asm_unistd::__NR_umask; +pub use linux_headers_asm_unistd::__NR_prctl; +pub use linux_headers_asm_unistd::__NR_getcpu; +pub use linux_headers_asm_unistd::__NR_gettimeofday; +pub use linux_headers_asm_unistd::__NR_settimeofday; +pub use linux_headers_asm_unistd::__NR_adjtimex; +pub use linux_headers_asm_unistd::__NR_getpid; +pub use linux_headers_asm_unistd::__NR_getppid; +pub use linux_headers_asm_unistd::__NR_getuid; +pub use linux_headers_asm_unistd::__NR_geteuid; +pub use linux_headers_asm_unistd::__NR_getgid; +pub use linux_headers_asm_unistd::__NR_getegid; +pub use linux_headers_asm_unistd::__NR_gettid; +pub use linux_headers_asm_unistd::__NR_sysinfo; +pub use linux_headers_asm_unistd::__NR_mq_open; +pub use linux_headers_asm_unistd::__NR_mq_unlink; +pub use linux_headers_asm_unistd::__NR_mq_timedsend; +pub use linux_headers_asm_unistd::__NR_mq_timedreceive; +pub use linux_headers_asm_unistd::__NR_mq_notify; +pub use linux_headers_asm_unistd::__NR_mq_getsetattr; +pub use linux_headers_asm_unistd::__NR_msgget; +pub use linux_headers_asm_unistd::__NR_msgctl; +pub use linux_headers_asm_unistd::__NR_msgrcv; +pub use linux_headers_asm_unistd::__NR_msgsnd; +pub use linux_headers_asm_unistd::__NR_semget; +pub use linux_headers_asm_unistd::__NR_semctl; +pub use linux_headers_asm_unistd::__NR_semtimedop; +pub use linux_headers_asm_unistd::__NR_semop; +pub use linux_headers_asm_unistd::__NR_shmget; +pub use linux_headers_asm_unistd::__NR_shmctl; +pub use linux_headers_asm_unistd::__NR_shmat; +pub use linux_headers_asm_unistd::__NR_shmdt; +pub use linux_headers_asm_unistd::__NR_socket; +pub use linux_headers_asm_unistd::__NR_socketpair; +pub use linux_headers_asm_unistd::__NR_bind; +pub use linux_headers_asm_unistd::__NR_listen; +pub use linux_headers_asm_unistd::__NR_accept; +pub use linux_headers_asm_unistd::__NR_connect; +pub use linux_headers_asm_unistd::__NR_getsockname; +pub use linux_headers_asm_unistd::__NR_getpeername; +pub use linux_headers_asm_unistd::__NR_sendto; +pub use linux_headers_asm_unistd::__NR_recvfrom; +pub use linux_headers_asm_unistd::__NR_setsockopt; +pub use linux_headers_asm_unistd::__NR_getsockopt; +pub use linux_headers_asm_unistd::__NR_shutdown; +pub use linux_headers_asm_unistd::__NR_sendmsg; +pub use linux_headers_asm_unistd::__NR_recvmsg; +pub use linux_headers_asm_unistd::__NR_readahead; +pub use linux_headers_asm_unistd::__NR_brk; +pub use linux_headers_asm_unistd::__NR_munmap; +pub use linux_headers_asm_unistd::__NR_mremap; +pub use linux_headers_asm_unistd::__NR_add_key; +pub use linux_headers_asm_unistd::__NR_request_key; +pub use linux_headers_asm_unistd::__NR_keyctl; +pub use linux_headers_asm_unistd::__NR_clone; +pub use linux_headers_asm_unistd::__NR_execve; +pub use linux_headers_asm_unistd::__NR_mmap; +pub use linux_headers_asm_unistd::__NR_fadvise64; +pub use linux_headers_asm_unistd::__NR_swapon; +pub use linux_headers_asm_unistd::__NR_swapoff; +pub use linux_headers_asm_unistd::__NR_mprotect; +pub use linux_headers_asm_unistd::__NR_msync; +pub use linux_headers_asm_unistd::__NR_mlock; +pub use linux_headers_asm_unistd::__NR_munlock; +pub use linux_headers_asm_unistd::__NR_mlockall; +pub use linux_headers_asm_unistd::__NR_munlockall; +pub use linux_headers_asm_unistd::__NR_mincore; +pub use linux_headers_asm_unistd::__NR_madvise; +pub use linux_headers_asm_unistd::__NR_remap_file_pages; +pub use linux_headers_asm_unistd::__NR_mbind; +pub use linux_headers_asm_unistd::__NR_get_mempolicy; +pub use linux_headers_asm_unistd::__NR_set_mempolicy; +pub use linux_headers_asm_unistd::__NR_migrate_pages; +pub use linux_headers_asm_unistd::__NR_move_pages; +pub use linux_headers_asm_unistd::__NR_rt_tgsigqueueinfo; +pub use linux_headers_asm_unistd::__NR_perf_event_open; +pub use linux_headers_asm_unistd::__NR_accept4; +pub use linux_headers_asm_unistd::__NR_recvmmsg; +pub use linux_headers_asm_unistd::__NR_riscv_hwprobe; +pub use linux_headers_asm_unistd::__NR_riscv_flush_icache; +pub use linux_headers_asm_unistd::__NR_wait4; +pub use linux_headers_asm_unistd::__NR_prlimit64; +pub use linux_headers_asm_unistd::__NR_fanotify_init; +pub use linux_headers_asm_unistd::__NR_fanotify_mark; +pub use linux_headers_asm_unistd::__NR_name_to_handle_at; +pub use linux_headers_asm_unistd::__NR_open_by_handle_at; +pub use linux_headers_asm_unistd::__NR_clock_adjtime; +pub use linux_headers_asm_unistd::__NR_syncfs; +pub use linux_headers_asm_unistd::__NR_setns; +pub use linux_headers_asm_unistd::__NR_sendmmsg; +pub use linux_headers_asm_unistd::__NR_process_vm_readv; +pub use linux_headers_asm_unistd::__NR_process_vm_writev; +pub use linux_headers_asm_unistd::__NR_kcmp; +pub use linux_headers_asm_unistd::__NR_finit_module; +pub use linux_headers_asm_unistd::__NR_sched_setattr; +pub use linux_headers_asm_unistd::__NR_sched_getattr; +pub use linux_headers_asm_unistd::__NR_renameat2; +pub use linux_headers_asm_unistd::__NR_seccomp; +pub use linux_headers_asm_unistd::__NR_getrandom; +pub use linux_headers_asm_unistd::__NR_memfd_create; +pub use linux_headers_asm_unistd::__NR_bpf; +pub use linux_headers_asm_unistd::__NR_execveat; +pub use linux_headers_asm_unistd::__NR_userfaultfd; +pub use linux_headers_asm_unistd::__NR_membarrier; +pub use linux_headers_asm_unistd::__NR_mlock2; +pub use linux_headers_asm_unistd::__NR_copy_file_range; +pub use linux_headers_asm_unistd::__NR_preadv2; +pub use linux_headers_asm_unistd::__NR_pwritev2; +pub use linux_headers_asm_unistd::__NR_pkey_mprotect; +pub use linux_headers_asm_unistd::__NR_pkey_alloc; +pub use linux_headers_asm_unistd::__NR_pkey_free; +pub use linux_headers_asm_unistd::__NR_statx; +pub use linux_headers_asm_unistd::__NR_io_pgetevents; +pub use linux_headers_asm_unistd::__NR_rseq; +pub use linux_headers_asm_unistd::__NR_kexec_file_load; +pub use linux_headers_asm_unistd::__NR_pidfd_send_signal; +pub use linux_headers_asm_unistd::__NR_io_uring_setup; +pub use linux_headers_asm_unistd::__NR_io_uring_enter; +pub use linux_headers_asm_unistd::__NR_io_uring_register; +pub use linux_headers_asm_unistd::__NR_open_tree; +pub use linux_headers_asm_unistd::__NR_move_mount; +pub use linux_headers_asm_unistd::__NR_fsopen; +pub use linux_headers_asm_unistd::__NR_fsconfig; +pub use linux_headers_asm_unistd::__NR_fsmount; +pub use linux_headers_asm_unistd::__NR_fspick; +pub use linux_headers_asm_unistd::__NR_pidfd_open; +pub use linux_headers_asm_unistd::__NR_clone3; +pub use linux_headers_asm_unistd::__NR_close_range; +pub use linux_headers_asm_unistd::__NR_openat2; +pub use linux_headers_asm_unistd::__NR_pidfd_getfd; +pub use linux_headers_asm_unistd::__NR_faccessat2; +pub use linux_headers_asm_unistd::__NR_process_madvise; +pub use linux_headers_asm_unistd::__NR_epoll_pwait2; +pub use linux_headers_asm_unistd::__NR_mount_setattr; +pub use linux_headers_asm_unistd::__NR_quotactl_fd; +pub use linux_headers_asm_unistd::__NR_landlock_create_ruleset; +pub use linux_headers_asm_unistd::__NR_landlock_add_rule; +pub use linux_headers_asm_unistd::__NR_landlock_restrict_self; +pub use linux_headers_asm_unistd::__NR_memfd_secret; +pub use linux_headers_asm_unistd::__NR_process_mrelease; +pub use linux_headers_asm_unistd::__NR_futex_waitv; +pub use linux_headers_asm_unistd::__NR_set_mempolicy_home_node; +pub use linux_headers_asm_unistd::__NR_cachestat; +pub use linux_headers_asm_unistd::__NR_fchmodat2; +pub use linux_headers_asm_unistd::__NR_map_shadow_stack; +pub use linux_headers_asm_unistd::__NR_futex_wake; +pub use linux_headers_asm_unistd::__NR_futex_wait; +pub use linux_headers_asm_unistd::__NR_futex_requeue; +pub use linux_headers_asm_unistd::__NR_statmount; +pub use linux_headers_asm_unistd::__NR_listmount; +pub use linux_headers_asm_unistd::__NR_lsm_get_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_set_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_list_modules; +pub use linux_headers_asm_unistd::__NR_mseal; +mod linux_headers_asm_hwprobe; +pub use linux_headers_asm_hwprobe::riscv_hwprobe; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MVENDORID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MARCHID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MIMPID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_BASE_BEHAVIOR; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_BASE_BEHAVIOR_IMA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_IMA_EXT_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_FD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_C; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_V; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICBOZ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKX; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKG; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTNTL; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZTSO; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZACAS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICOND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTPAUSE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64D; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZAWRS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_CPUPERF_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_MASK; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_TIME_CSR_FREQ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_WHICH_CPUS; +mod sys_auxv; +pub use sys_auxv::getauxval; +mod elf; +pub use elf::Elf32_auxv_t; +pub use elf::Elf64_auxv_t; +pub type c_char = u8; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_gnu/sys_auxv.rs b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/sys_auxv.rs new file mode 100644 index 000000000..aeae85616 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_gnu/sys_auxv.rs @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +extern "C" { + pub fn getauxval(__type: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; +} diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/elf.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/elf.rs new file mode 100644 index 000000000..cc057e901 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/elf.rs @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf32_auxv_t { + pub a_type: u32, + pub a_un: Elf32_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf32_auxv_t__bindgen_ty_1 { + pub a_val: u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Elf64_auxv_t { + pub a_type: u64, + pub a_un: Elf64_auxv_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Elf64_auxv_t__bindgen_ty_1 { + pub a_val: u64, +} diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_hwprobe.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_hwprobe.rs new file mode 100644 index 000000000..ee3d3d307 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_hwprobe.rs @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct riscv_hwprobe { + pub key: __s64, + pub value: __u64, +} +pub const RISCV_HWPROBE_KEY_MVENDORID: u32 = 0; +pub const RISCV_HWPROBE_KEY_MARCHID: u32 = 1; +pub const RISCV_HWPROBE_KEY_MIMPID: u32 = 2; +pub const RISCV_HWPROBE_KEY_BASE_BEHAVIOR: u32 = 3; +pub const RISCV_HWPROBE_BASE_BEHAVIOR_IMA: u32 = 1; +pub const RISCV_HWPROBE_KEY_IMA_EXT_0: u32 = 4; +pub const RISCV_HWPROBE_IMA_FD: u32 = 1; +pub const RISCV_HWPROBE_IMA_C: u32 = 2; +pub const RISCV_HWPROBE_IMA_V: u32 = 4; +pub const RISCV_HWPROBE_EXT_ZBA: u32 = 8; +pub const RISCV_HWPROBE_EXT_ZBB: u32 = 16; +pub const RISCV_HWPROBE_EXT_ZBS: u32 = 32; +pub const RISCV_HWPROBE_EXT_ZICBOZ: u32 = 64; +pub const RISCV_HWPROBE_EXT_ZBC: u32 = 128; +pub const RISCV_HWPROBE_EXT_ZBKB: u32 = 256; +pub const RISCV_HWPROBE_EXT_ZBKC: u32 = 512; +pub const RISCV_HWPROBE_EXT_ZBKX: u32 = 1024; +pub const RISCV_HWPROBE_EXT_ZKND: u32 = 2048; +pub const RISCV_HWPROBE_EXT_ZKNE: u32 = 4096; +pub const RISCV_HWPROBE_EXT_ZKNH: u32 = 8192; +pub const RISCV_HWPROBE_EXT_ZKSED: u32 = 16384; +pub const RISCV_HWPROBE_EXT_ZKSH: u32 = 32768; +pub const RISCV_HWPROBE_EXT_ZKT: u32 = 65536; +pub const RISCV_HWPROBE_EXT_ZVBB: u32 = 131072; +pub const RISCV_HWPROBE_EXT_ZVBC: u32 = 262144; +pub const RISCV_HWPROBE_EXT_ZVKB: u32 = 524288; +pub const RISCV_HWPROBE_EXT_ZVKG: u32 = 1048576; +pub const RISCV_HWPROBE_EXT_ZVKNED: u32 = 2097152; +pub const RISCV_HWPROBE_EXT_ZVKNHA: u32 = 4194304; +pub const RISCV_HWPROBE_EXT_ZVKNHB: u32 = 8388608; +pub const RISCV_HWPROBE_EXT_ZVKSED: u32 = 16777216; +pub const RISCV_HWPROBE_EXT_ZVKSH: u32 = 33554432; +pub const RISCV_HWPROBE_EXT_ZVKT: u32 = 67108864; +pub const RISCV_HWPROBE_EXT_ZFH: u32 = 134217728; +pub const RISCV_HWPROBE_EXT_ZFHMIN: u32 = 268435456; +pub const RISCV_HWPROBE_EXT_ZIHINTNTL: u32 = 536870912; +pub const RISCV_HWPROBE_EXT_ZVFH: u32 = 1073741824; +pub const RISCV_HWPROBE_EXT_ZVFHMIN: u32 = 2147483648; +pub const RISCV_HWPROBE_EXT_ZFA: u64 = 4294967296; +pub const RISCV_HWPROBE_EXT_ZTSO: u64 = 8589934592; +pub const RISCV_HWPROBE_EXT_ZACAS: u64 = 17179869184; +pub const RISCV_HWPROBE_EXT_ZICOND: u64 = 34359738368; +pub const RISCV_HWPROBE_EXT_ZIHINTPAUSE: u64 = 68719476736; +pub const RISCV_HWPROBE_EXT_ZVE32X: u64 = 137438953472; +pub const RISCV_HWPROBE_EXT_ZVE32F: u64 = 274877906944; +pub const RISCV_HWPROBE_EXT_ZVE64X: u64 = 549755813888; +pub const RISCV_HWPROBE_EXT_ZVE64F: u64 = 1099511627776; +pub const RISCV_HWPROBE_EXT_ZVE64D: u64 = 2199023255552; +pub const RISCV_HWPROBE_EXT_ZIMOP: u64 = 4398046511104; +pub const RISCV_HWPROBE_EXT_ZCA: u64 = 8796093022208; +pub const RISCV_HWPROBE_EXT_ZCB: u64 = 17592186044416; +pub const RISCV_HWPROBE_EXT_ZCD: u64 = 35184372088832; +pub const RISCV_HWPROBE_EXT_ZCF: u64 = 70368744177664; +pub const RISCV_HWPROBE_EXT_ZCMOP: u64 = 140737488355328; +pub const RISCV_HWPROBE_EXT_ZAWRS: u64 = 281474976710656; +pub const RISCV_HWPROBE_KEY_CPUPERF_0: u32 = 5; +pub const RISCV_HWPROBE_MISALIGNED_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_MISALIGNED_MASK: u32 = 7; +pub const RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE: u32 = 6; +pub const RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS: u32 = 7; +pub const RISCV_HWPROBE_KEY_TIME_CSR_FREQ: u32 = 8; +pub const RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF: u32 = 9; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN: u32 = 0; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED: u32 = 1; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW: u32 = 2; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_FAST: u32 = 3; +pub const RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED: u32 = 4; +pub const RISCV_HWPROBE_WHICH_CPUS: u32 = 1; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_unistd.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_unistd.rs new file mode 100644 index 000000000..a2c4d4729 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_asm_unistd.rs @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const __NR_io_setup: u32 = 0; +pub const __NR_io_destroy: u32 = 1; +pub const __NR_io_submit: u32 = 2; +pub const __NR_io_cancel: u32 = 3; +pub const __NR_io_getevents: u32 = 4; +pub const __NR_setxattr: u32 = 5; +pub const __NR_lsetxattr: u32 = 6; +pub const __NR_fsetxattr: u32 = 7; +pub const __NR_getxattr: u32 = 8; +pub const __NR_lgetxattr: u32 = 9; +pub const __NR_fgetxattr: u32 = 10; +pub const __NR_listxattr: u32 = 11; +pub const __NR_llistxattr: u32 = 12; +pub const __NR_flistxattr: u32 = 13; +pub const __NR_removexattr: u32 = 14; +pub const __NR_lremovexattr: u32 = 15; +pub const __NR_fremovexattr: u32 = 16; +pub const __NR_getcwd: u32 = 17; +pub const __NR_lookup_dcookie: u32 = 18; +pub const __NR_eventfd2: u32 = 19; +pub const __NR_epoll_create1: u32 = 20; +pub const __NR_epoll_ctl: u32 = 21; +pub const __NR_epoll_pwait: u32 = 22; +pub const __NR_dup: u32 = 23; +pub const __NR_dup3: u32 = 24; +pub const __NR_fcntl: u32 = 25; +pub const __NR_inotify_init1: u32 = 26; +pub const __NR_inotify_add_watch: u32 = 27; +pub const __NR_inotify_rm_watch: u32 = 28; +pub const __NR_ioctl: u32 = 29; +pub const __NR_ioprio_set: u32 = 30; +pub const __NR_ioprio_get: u32 = 31; +pub const __NR_flock: u32 = 32; +pub const __NR_mknodat: u32 = 33; +pub const __NR_mkdirat: u32 = 34; +pub const __NR_unlinkat: u32 = 35; +pub const __NR_symlinkat: u32 = 36; +pub const __NR_linkat: u32 = 37; +pub const __NR_umount2: u32 = 39; +pub const __NR_mount: u32 = 40; +pub const __NR_pivot_root: u32 = 41; +pub const __NR_nfsservctl: u32 = 42; +pub const __NR_statfs: u32 = 43; +pub const __NR_fstatfs: u32 = 44; +pub const __NR_truncate: u32 = 45; +pub const __NR_ftruncate: u32 = 46; +pub const __NR_fallocate: u32 = 47; +pub const __NR_faccessat: u32 = 48; +pub const __NR_chdir: u32 = 49; +pub const __NR_fchdir: u32 = 50; +pub const __NR_chroot: u32 = 51; +pub const __NR_fchmod: u32 = 52; +pub const __NR_fchmodat: u32 = 53; +pub const __NR_fchownat: u32 = 54; +pub const __NR_fchown: u32 = 55; +pub const __NR_openat: u32 = 56; +pub const __NR_close: u32 = 57; +pub const __NR_vhangup: u32 = 58; +pub const __NR_pipe2: u32 = 59; +pub const __NR_quotactl: u32 = 60; +pub const __NR_getdents64: u32 = 61; +pub const __NR_lseek: u32 = 62; +pub const __NR_read: u32 = 63; +pub const __NR_write: u32 = 64; +pub const __NR_readv: u32 = 65; +pub const __NR_writev: u32 = 66; +pub const __NR_pread64: u32 = 67; +pub const __NR_pwrite64: u32 = 68; +pub const __NR_preadv: u32 = 69; +pub const __NR_pwritev: u32 = 70; +pub const __NR_sendfile: u32 = 71; +pub const __NR_pselect6: u32 = 72; +pub const __NR_ppoll: u32 = 73; +pub const __NR_signalfd4: u32 = 74; +pub const __NR_vmsplice: u32 = 75; +pub const __NR_splice: u32 = 76; +pub const __NR_tee: u32 = 77; +pub const __NR_readlinkat: u32 = 78; +pub const __NR_newfstatat: u32 = 79; +pub const __NR_fstat: u32 = 80; +pub const __NR_sync: u32 = 81; +pub const __NR_fsync: u32 = 82; +pub const __NR_fdatasync: u32 = 83; +pub const __NR_sync_file_range: u32 = 84; +pub const __NR_timerfd_create: u32 = 85; +pub const __NR_timerfd_settime: u32 = 86; +pub const __NR_timerfd_gettime: u32 = 87; +pub const __NR_utimensat: u32 = 88; +pub const __NR_acct: u32 = 89; +pub const __NR_capget: u32 = 90; +pub const __NR_capset: u32 = 91; +pub const __NR_personality: u32 = 92; +pub const __NR_exit: u32 = 93; +pub const __NR_exit_group: u32 = 94; +pub const __NR_waitid: u32 = 95; +pub const __NR_set_tid_address: u32 = 96; +pub const __NR_unshare: u32 = 97; +pub const __NR_futex: u32 = 98; +pub const __NR_set_robust_list: u32 = 99; +pub const __NR_get_robust_list: u32 = 100; +pub const __NR_nanosleep: u32 = 101; +pub const __NR_getitimer: u32 = 102; +pub const __NR_setitimer: u32 = 103; +pub const __NR_kexec_load: u32 = 104; +pub const __NR_init_module: u32 = 105; +pub const __NR_delete_module: u32 = 106; +pub const __NR_timer_create: u32 = 107; +pub const __NR_timer_gettime: u32 = 108; +pub const __NR_timer_getoverrun: u32 = 109; +pub const __NR_timer_settime: u32 = 110; +pub const __NR_timer_delete: u32 = 111; +pub const __NR_clock_settime: u32 = 112; +pub const __NR_clock_gettime: u32 = 113; +pub const __NR_clock_getres: u32 = 114; +pub const __NR_clock_nanosleep: u32 = 115; +pub const __NR_syslog: u32 = 116; +pub const __NR_ptrace: u32 = 117; +pub const __NR_sched_setparam: u32 = 118; +pub const __NR_sched_setscheduler: u32 = 119; +pub const __NR_sched_getscheduler: u32 = 120; +pub const __NR_sched_getparam: u32 = 121; +pub const __NR_sched_setaffinity: u32 = 122; +pub const __NR_sched_getaffinity: u32 = 123; +pub const __NR_sched_yield: u32 = 124; +pub const __NR_sched_get_priority_max: u32 = 125; +pub const __NR_sched_get_priority_min: u32 = 126; +pub const __NR_sched_rr_get_interval: u32 = 127; +pub const __NR_restart_syscall: u32 = 128; +pub const __NR_kill: u32 = 129; +pub const __NR_tkill: u32 = 130; +pub const __NR_tgkill: u32 = 131; +pub const __NR_sigaltstack: u32 = 132; +pub const __NR_rt_sigsuspend: u32 = 133; +pub const __NR_rt_sigaction: u32 = 134; +pub const __NR_rt_sigprocmask: u32 = 135; +pub const __NR_rt_sigpending: u32 = 136; +pub const __NR_rt_sigtimedwait: u32 = 137; +pub const __NR_rt_sigqueueinfo: u32 = 138; +pub const __NR_rt_sigreturn: u32 = 139; +pub const __NR_setpriority: u32 = 140; +pub const __NR_getpriority: u32 = 141; +pub const __NR_reboot: u32 = 142; +pub const __NR_setregid: u32 = 143; +pub const __NR_setgid: u32 = 144; +pub const __NR_setreuid: u32 = 145; +pub const __NR_setuid: u32 = 146; +pub const __NR_setresuid: u32 = 147; +pub const __NR_getresuid: u32 = 148; +pub const __NR_setresgid: u32 = 149; +pub const __NR_getresgid: u32 = 150; +pub const __NR_setfsuid: u32 = 151; +pub const __NR_setfsgid: u32 = 152; +pub const __NR_times: u32 = 153; +pub const __NR_setpgid: u32 = 154; +pub const __NR_getpgid: u32 = 155; +pub const __NR_getsid: u32 = 156; +pub const __NR_setsid: u32 = 157; +pub const __NR_getgroups: u32 = 158; +pub const __NR_setgroups: u32 = 159; +pub const __NR_uname: u32 = 160; +pub const __NR_sethostname: u32 = 161; +pub const __NR_setdomainname: u32 = 162; +pub const __NR_getrlimit: u32 = 163; +pub const __NR_setrlimit: u32 = 164; +pub const __NR_getrusage: u32 = 165; +pub const __NR_umask: u32 = 166; +pub const __NR_prctl: u32 = 167; +pub const __NR_getcpu: u32 = 168; +pub const __NR_gettimeofday: u32 = 169; +pub const __NR_settimeofday: u32 = 170; +pub const __NR_adjtimex: u32 = 171; +pub const __NR_getpid: u32 = 172; +pub const __NR_getppid: u32 = 173; +pub const __NR_getuid: u32 = 174; +pub const __NR_geteuid: u32 = 175; +pub const __NR_getgid: u32 = 176; +pub const __NR_getegid: u32 = 177; +pub const __NR_gettid: u32 = 178; +pub const __NR_sysinfo: u32 = 179; +pub const __NR_mq_open: u32 = 180; +pub const __NR_mq_unlink: u32 = 181; +pub const __NR_mq_timedsend: u32 = 182; +pub const __NR_mq_timedreceive: u32 = 183; +pub const __NR_mq_notify: u32 = 184; +pub const __NR_mq_getsetattr: u32 = 185; +pub const __NR_msgget: u32 = 186; +pub const __NR_msgctl: u32 = 187; +pub const __NR_msgrcv: u32 = 188; +pub const __NR_msgsnd: u32 = 189; +pub const __NR_semget: u32 = 190; +pub const __NR_semctl: u32 = 191; +pub const __NR_semtimedop: u32 = 192; +pub const __NR_semop: u32 = 193; +pub const __NR_shmget: u32 = 194; +pub const __NR_shmctl: u32 = 195; +pub const __NR_shmat: u32 = 196; +pub const __NR_shmdt: u32 = 197; +pub const __NR_socket: u32 = 198; +pub const __NR_socketpair: u32 = 199; +pub const __NR_bind: u32 = 200; +pub const __NR_listen: u32 = 201; +pub const __NR_accept: u32 = 202; +pub const __NR_connect: u32 = 203; +pub const __NR_getsockname: u32 = 204; +pub const __NR_getpeername: u32 = 205; +pub const __NR_sendto: u32 = 206; +pub const __NR_recvfrom: u32 = 207; +pub const __NR_setsockopt: u32 = 208; +pub const __NR_getsockopt: u32 = 209; +pub const __NR_shutdown: u32 = 210; +pub const __NR_sendmsg: u32 = 211; +pub const __NR_recvmsg: u32 = 212; +pub const __NR_readahead: u32 = 213; +pub const __NR_brk: u32 = 214; +pub const __NR_munmap: u32 = 215; +pub const __NR_mremap: u32 = 216; +pub const __NR_add_key: u32 = 217; +pub const __NR_request_key: u32 = 218; +pub const __NR_keyctl: u32 = 219; +pub const __NR_clone: u32 = 220; +pub const __NR_execve: u32 = 221; +pub const __NR_mmap: u32 = 222; +pub const __NR_fadvise64: u32 = 223; +pub const __NR_swapon: u32 = 224; +pub const __NR_swapoff: u32 = 225; +pub const __NR_mprotect: u32 = 226; +pub const __NR_msync: u32 = 227; +pub const __NR_mlock: u32 = 228; +pub const __NR_munlock: u32 = 229; +pub const __NR_mlockall: u32 = 230; +pub const __NR_munlockall: u32 = 231; +pub const __NR_mincore: u32 = 232; +pub const __NR_madvise: u32 = 233; +pub const __NR_remap_file_pages: u32 = 234; +pub const __NR_mbind: u32 = 235; +pub const __NR_get_mempolicy: u32 = 236; +pub const __NR_set_mempolicy: u32 = 237; +pub const __NR_migrate_pages: u32 = 238; +pub const __NR_move_pages: u32 = 239; +pub const __NR_rt_tgsigqueueinfo: u32 = 240; +pub const __NR_perf_event_open: u32 = 241; +pub const __NR_accept4: u32 = 242; +pub const __NR_recvmmsg: u32 = 243; +pub const __NR_riscv_hwprobe: u32 = 258; +pub const __NR_riscv_flush_icache: u32 = 259; +pub const __NR_wait4: u32 = 260; +pub const __NR_prlimit64: u32 = 261; +pub const __NR_fanotify_init: u32 = 262; +pub const __NR_fanotify_mark: u32 = 263; +pub const __NR_name_to_handle_at: u32 = 264; +pub const __NR_open_by_handle_at: u32 = 265; +pub const __NR_clock_adjtime: u32 = 266; +pub const __NR_syncfs: u32 = 267; +pub const __NR_setns: u32 = 268; +pub const __NR_sendmmsg: u32 = 269; +pub const __NR_process_vm_readv: u32 = 270; +pub const __NR_process_vm_writev: u32 = 271; +pub const __NR_kcmp: u32 = 272; +pub const __NR_finit_module: u32 = 273; +pub const __NR_sched_setattr: u32 = 274; +pub const __NR_sched_getattr: u32 = 275; +pub const __NR_renameat2: u32 = 276; +pub const __NR_seccomp: u32 = 277; +pub const __NR_getrandom: u32 = 278; +pub const __NR_memfd_create: u32 = 279; +pub const __NR_bpf: u32 = 280; +pub const __NR_execveat: u32 = 281; +pub const __NR_userfaultfd: u32 = 282; +pub const __NR_membarrier: u32 = 283; +pub const __NR_mlock2: u32 = 284; +pub const __NR_copy_file_range: u32 = 285; +pub const __NR_preadv2: u32 = 286; +pub const __NR_pwritev2: u32 = 287; +pub const __NR_pkey_mprotect: u32 = 288; +pub const __NR_pkey_alloc: u32 = 289; +pub const __NR_pkey_free: u32 = 290; +pub const __NR_statx: u32 = 291; +pub const __NR_io_pgetevents: u32 = 292; +pub const __NR_rseq: u32 = 293; +pub const __NR_kexec_file_load: u32 = 294; +pub const __NR_pidfd_send_signal: u32 = 424; +pub const __NR_io_uring_setup: u32 = 425; +pub const __NR_io_uring_enter: u32 = 426; +pub const __NR_io_uring_register: u32 = 427; +pub const __NR_open_tree: u32 = 428; +pub const __NR_move_mount: u32 = 429; +pub const __NR_fsopen: u32 = 430; +pub const __NR_fsconfig: u32 = 431; +pub const __NR_fsmount: u32 = 432; +pub const __NR_fspick: u32 = 433; +pub const __NR_pidfd_open: u32 = 434; +pub const __NR_clone3: u32 = 435; +pub const __NR_close_range: u32 = 436; +pub const __NR_openat2: u32 = 437; +pub const __NR_pidfd_getfd: u32 = 438; +pub const __NR_faccessat2: u32 = 439; +pub const __NR_process_madvise: u32 = 440; +pub const __NR_epoll_pwait2: u32 = 441; +pub const __NR_mount_setattr: u32 = 442; +pub const __NR_quotactl_fd: u32 = 443; +pub const __NR_landlock_create_ruleset: u32 = 444; +pub const __NR_landlock_add_rule: u32 = 445; +pub const __NR_landlock_restrict_self: u32 = 446; +pub const __NR_memfd_secret: u32 = 447; +pub const __NR_process_mrelease: u32 = 448; +pub const __NR_futex_waitv: u32 = 449; +pub const __NR_set_mempolicy_home_node: u32 = 450; +pub const __NR_cachestat: u32 = 451; +pub const __NR_fchmodat2: u32 = 452; +pub const __NR_map_shadow_stack: u32 = 453; +pub const __NR_futex_wake: u32 = 454; +pub const __NR_futex_wait: u32 = 455; +pub const __NR_futex_requeue: u32 = 456; +pub const __NR_statmount: u32 = 457; +pub const __NR_listmount: u32 = 458; +pub const __NR_lsm_get_self_attr: u32 = 459; +pub const __NR_lsm_set_self_attr: u32 = 460; +pub const __NR_lsm_list_modules: u32 = 461; +pub const __NR_mseal: u32 = 462; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_auxvec.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_auxvec.rs new file mode 100644 index 000000000..2b4a98bea --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_auxvec.rs @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const AT_HWCAP: u32 = 16; +pub const AT_HWCAP2: u32 = 26; +pub const AT_HWCAP3: u32 = 29; +pub const AT_HWCAP4: u32 = 30; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_prctl.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_prctl.rs new file mode 100644 index 000000000..0d4c45c68 --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/linux_headers_linux_prctl.rs @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +pub const PR_GET_AUXV: u32 = 1096112214; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/mod.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/mod.rs new file mode 100644 index 000000000..88c31bbaf --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/mod.rs @@ -0,0 +1,413 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +#![cfg_attr(rustfmt, rustfmt::skip)] +mod linux_headers_linux_auxvec; +pub use linux_headers_linux_auxvec::AT_HWCAP; +pub use linux_headers_linux_auxvec::AT_HWCAP2; +pub use linux_headers_linux_auxvec::AT_HWCAP3; +pub use linux_headers_linux_auxvec::AT_HWCAP4; +mod linux_headers_linux_prctl; +pub use linux_headers_linux_prctl::PR_GET_AUXV; +mod linux_headers_asm_unistd; +pub use linux_headers_asm_unistd::__NR_io_setup; +pub use linux_headers_asm_unistd::__NR_io_destroy; +pub use linux_headers_asm_unistd::__NR_io_submit; +pub use linux_headers_asm_unistd::__NR_io_cancel; +pub use linux_headers_asm_unistd::__NR_io_getevents; +pub use linux_headers_asm_unistd::__NR_setxattr; +pub use linux_headers_asm_unistd::__NR_lsetxattr; +pub use linux_headers_asm_unistd::__NR_fsetxattr; +pub use linux_headers_asm_unistd::__NR_getxattr; +pub use linux_headers_asm_unistd::__NR_lgetxattr; +pub use linux_headers_asm_unistd::__NR_fgetxattr; +pub use linux_headers_asm_unistd::__NR_listxattr; +pub use linux_headers_asm_unistd::__NR_llistxattr; +pub use linux_headers_asm_unistd::__NR_flistxattr; +pub use linux_headers_asm_unistd::__NR_removexattr; +pub use linux_headers_asm_unistd::__NR_lremovexattr; +pub use linux_headers_asm_unistd::__NR_fremovexattr; +pub use linux_headers_asm_unistd::__NR_getcwd; +pub use linux_headers_asm_unistd::__NR_lookup_dcookie; +pub use linux_headers_asm_unistd::__NR_eventfd2; +pub use linux_headers_asm_unistd::__NR_epoll_create1; +pub use linux_headers_asm_unistd::__NR_epoll_ctl; +pub use linux_headers_asm_unistd::__NR_epoll_pwait; +pub use linux_headers_asm_unistd::__NR_dup; +pub use linux_headers_asm_unistd::__NR_dup3; +pub use linux_headers_asm_unistd::__NR_fcntl; +pub use linux_headers_asm_unistd::__NR_inotify_init1; +pub use linux_headers_asm_unistd::__NR_inotify_add_watch; +pub use linux_headers_asm_unistd::__NR_inotify_rm_watch; +pub use linux_headers_asm_unistd::__NR_ioctl; +pub use linux_headers_asm_unistd::__NR_ioprio_set; +pub use linux_headers_asm_unistd::__NR_ioprio_get; +pub use linux_headers_asm_unistd::__NR_flock; +pub use linux_headers_asm_unistd::__NR_mknodat; +pub use linux_headers_asm_unistd::__NR_mkdirat; +pub use linux_headers_asm_unistd::__NR_unlinkat; +pub use linux_headers_asm_unistd::__NR_symlinkat; +pub use linux_headers_asm_unistd::__NR_linkat; +pub use linux_headers_asm_unistd::__NR_umount2; +pub use linux_headers_asm_unistd::__NR_mount; +pub use linux_headers_asm_unistd::__NR_pivot_root; +pub use linux_headers_asm_unistd::__NR_nfsservctl; +pub use linux_headers_asm_unistd::__NR_statfs; +pub use linux_headers_asm_unistd::__NR_fstatfs; +pub use linux_headers_asm_unistd::__NR_truncate; +pub use linux_headers_asm_unistd::__NR_ftruncate; +pub use linux_headers_asm_unistd::__NR_fallocate; +pub use linux_headers_asm_unistd::__NR_faccessat; +pub use linux_headers_asm_unistd::__NR_chdir; +pub use linux_headers_asm_unistd::__NR_fchdir; +pub use linux_headers_asm_unistd::__NR_chroot; +pub use linux_headers_asm_unistd::__NR_fchmod; +pub use linux_headers_asm_unistd::__NR_fchmodat; +pub use linux_headers_asm_unistd::__NR_fchownat; +pub use linux_headers_asm_unistd::__NR_fchown; +pub use linux_headers_asm_unistd::__NR_openat; +pub use linux_headers_asm_unistd::__NR_close; +pub use linux_headers_asm_unistd::__NR_vhangup; +pub use linux_headers_asm_unistd::__NR_pipe2; +pub use linux_headers_asm_unistd::__NR_quotactl; +pub use linux_headers_asm_unistd::__NR_getdents64; +pub use linux_headers_asm_unistd::__NR_lseek; +pub use linux_headers_asm_unistd::__NR_read; +pub use linux_headers_asm_unistd::__NR_write; +pub use linux_headers_asm_unistd::__NR_readv; +pub use linux_headers_asm_unistd::__NR_writev; +pub use linux_headers_asm_unistd::__NR_pread64; +pub use linux_headers_asm_unistd::__NR_pwrite64; +pub use linux_headers_asm_unistd::__NR_preadv; +pub use linux_headers_asm_unistd::__NR_pwritev; +pub use linux_headers_asm_unistd::__NR_sendfile; +pub use linux_headers_asm_unistd::__NR_pselect6; +pub use linux_headers_asm_unistd::__NR_ppoll; +pub use linux_headers_asm_unistd::__NR_signalfd4; +pub use linux_headers_asm_unistd::__NR_vmsplice; +pub use linux_headers_asm_unistd::__NR_splice; +pub use linux_headers_asm_unistd::__NR_tee; +pub use linux_headers_asm_unistd::__NR_readlinkat; +pub use linux_headers_asm_unistd::__NR_newfstatat; +pub use linux_headers_asm_unistd::__NR_fstat; +pub use linux_headers_asm_unistd::__NR_sync; +pub use linux_headers_asm_unistd::__NR_fsync; +pub use linux_headers_asm_unistd::__NR_fdatasync; +pub use linux_headers_asm_unistd::__NR_sync_file_range; +pub use linux_headers_asm_unistd::__NR_timerfd_create; +pub use linux_headers_asm_unistd::__NR_timerfd_settime; +pub use linux_headers_asm_unistd::__NR_timerfd_gettime; +pub use linux_headers_asm_unistd::__NR_utimensat; +pub use linux_headers_asm_unistd::__NR_acct; +pub use linux_headers_asm_unistd::__NR_capget; +pub use linux_headers_asm_unistd::__NR_capset; +pub use linux_headers_asm_unistd::__NR_personality; +pub use linux_headers_asm_unistd::__NR_exit; +pub use linux_headers_asm_unistd::__NR_exit_group; +pub use linux_headers_asm_unistd::__NR_waitid; +pub use linux_headers_asm_unistd::__NR_set_tid_address; +pub use linux_headers_asm_unistd::__NR_unshare; +pub use linux_headers_asm_unistd::__NR_futex; +pub use linux_headers_asm_unistd::__NR_set_robust_list; +pub use linux_headers_asm_unistd::__NR_get_robust_list; +pub use linux_headers_asm_unistd::__NR_nanosleep; +pub use linux_headers_asm_unistd::__NR_getitimer; +pub use linux_headers_asm_unistd::__NR_setitimer; +pub use linux_headers_asm_unistd::__NR_kexec_load; +pub use linux_headers_asm_unistd::__NR_init_module; +pub use linux_headers_asm_unistd::__NR_delete_module; +pub use linux_headers_asm_unistd::__NR_timer_create; +pub use linux_headers_asm_unistd::__NR_timer_gettime; +pub use linux_headers_asm_unistd::__NR_timer_getoverrun; +pub use linux_headers_asm_unistd::__NR_timer_settime; +pub use linux_headers_asm_unistd::__NR_timer_delete; +pub use linux_headers_asm_unistd::__NR_clock_settime; +pub use linux_headers_asm_unistd::__NR_clock_gettime; +pub use linux_headers_asm_unistd::__NR_clock_getres; +pub use linux_headers_asm_unistd::__NR_clock_nanosleep; +pub use linux_headers_asm_unistd::__NR_syslog; +pub use linux_headers_asm_unistd::__NR_ptrace; +pub use linux_headers_asm_unistd::__NR_sched_setparam; +pub use linux_headers_asm_unistd::__NR_sched_setscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getscheduler; +pub use linux_headers_asm_unistd::__NR_sched_getparam; +pub use linux_headers_asm_unistd::__NR_sched_setaffinity; +pub use linux_headers_asm_unistd::__NR_sched_getaffinity; +pub use linux_headers_asm_unistd::__NR_sched_yield; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_max; +pub use linux_headers_asm_unistd::__NR_sched_get_priority_min; +pub use linux_headers_asm_unistd::__NR_sched_rr_get_interval; +pub use linux_headers_asm_unistd::__NR_restart_syscall; +pub use linux_headers_asm_unistd::__NR_kill; +pub use linux_headers_asm_unistd::__NR_tkill; +pub use linux_headers_asm_unistd::__NR_tgkill; +pub use linux_headers_asm_unistd::__NR_sigaltstack; +pub use linux_headers_asm_unistd::__NR_rt_sigsuspend; +pub use linux_headers_asm_unistd::__NR_rt_sigaction; +pub use linux_headers_asm_unistd::__NR_rt_sigprocmask; +pub use linux_headers_asm_unistd::__NR_rt_sigpending; +pub use linux_headers_asm_unistd::__NR_rt_sigtimedwait; +pub use linux_headers_asm_unistd::__NR_rt_sigqueueinfo; +pub use linux_headers_asm_unistd::__NR_rt_sigreturn; +pub use linux_headers_asm_unistd::__NR_setpriority; +pub use linux_headers_asm_unistd::__NR_getpriority; +pub use linux_headers_asm_unistd::__NR_reboot; +pub use linux_headers_asm_unistd::__NR_setregid; +pub use linux_headers_asm_unistd::__NR_setgid; +pub use linux_headers_asm_unistd::__NR_setreuid; +pub use linux_headers_asm_unistd::__NR_setuid; +pub use linux_headers_asm_unistd::__NR_setresuid; +pub use linux_headers_asm_unistd::__NR_getresuid; +pub use linux_headers_asm_unistd::__NR_setresgid; +pub use linux_headers_asm_unistd::__NR_getresgid; +pub use linux_headers_asm_unistd::__NR_setfsuid; +pub use linux_headers_asm_unistd::__NR_setfsgid; +pub use linux_headers_asm_unistd::__NR_times; +pub use linux_headers_asm_unistd::__NR_setpgid; +pub use linux_headers_asm_unistd::__NR_getpgid; +pub use linux_headers_asm_unistd::__NR_getsid; +pub use linux_headers_asm_unistd::__NR_setsid; +pub use linux_headers_asm_unistd::__NR_getgroups; +pub use linux_headers_asm_unistd::__NR_setgroups; +pub use linux_headers_asm_unistd::__NR_uname; +pub use linux_headers_asm_unistd::__NR_sethostname; +pub use linux_headers_asm_unistd::__NR_setdomainname; +pub use linux_headers_asm_unistd::__NR_getrlimit; +pub use linux_headers_asm_unistd::__NR_setrlimit; +pub use linux_headers_asm_unistd::__NR_getrusage; +pub use linux_headers_asm_unistd::__NR_umask; +pub use linux_headers_asm_unistd::__NR_prctl; +pub use linux_headers_asm_unistd::__NR_getcpu; +pub use linux_headers_asm_unistd::__NR_gettimeofday; +pub use linux_headers_asm_unistd::__NR_settimeofday; +pub use linux_headers_asm_unistd::__NR_adjtimex; +pub use linux_headers_asm_unistd::__NR_getpid; +pub use linux_headers_asm_unistd::__NR_getppid; +pub use linux_headers_asm_unistd::__NR_getuid; +pub use linux_headers_asm_unistd::__NR_geteuid; +pub use linux_headers_asm_unistd::__NR_getgid; +pub use linux_headers_asm_unistd::__NR_getegid; +pub use linux_headers_asm_unistd::__NR_gettid; +pub use linux_headers_asm_unistd::__NR_sysinfo; +pub use linux_headers_asm_unistd::__NR_mq_open; +pub use linux_headers_asm_unistd::__NR_mq_unlink; +pub use linux_headers_asm_unistd::__NR_mq_timedsend; +pub use linux_headers_asm_unistd::__NR_mq_timedreceive; +pub use linux_headers_asm_unistd::__NR_mq_notify; +pub use linux_headers_asm_unistd::__NR_mq_getsetattr; +pub use linux_headers_asm_unistd::__NR_msgget; +pub use linux_headers_asm_unistd::__NR_msgctl; +pub use linux_headers_asm_unistd::__NR_msgrcv; +pub use linux_headers_asm_unistd::__NR_msgsnd; +pub use linux_headers_asm_unistd::__NR_semget; +pub use linux_headers_asm_unistd::__NR_semctl; +pub use linux_headers_asm_unistd::__NR_semtimedop; +pub use linux_headers_asm_unistd::__NR_semop; +pub use linux_headers_asm_unistd::__NR_shmget; +pub use linux_headers_asm_unistd::__NR_shmctl; +pub use linux_headers_asm_unistd::__NR_shmat; +pub use linux_headers_asm_unistd::__NR_shmdt; +pub use linux_headers_asm_unistd::__NR_socket; +pub use linux_headers_asm_unistd::__NR_socketpair; +pub use linux_headers_asm_unistd::__NR_bind; +pub use linux_headers_asm_unistd::__NR_listen; +pub use linux_headers_asm_unistd::__NR_accept; +pub use linux_headers_asm_unistd::__NR_connect; +pub use linux_headers_asm_unistd::__NR_getsockname; +pub use linux_headers_asm_unistd::__NR_getpeername; +pub use linux_headers_asm_unistd::__NR_sendto; +pub use linux_headers_asm_unistd::__NR_recvfrom; +pub use linux_headers_asm_unistd::__NR_setsockopt; +pub use linux_headers_asm_unistd::__NR_getsockopt; +pub use linux_headers_asm_unistd::__NR_shutdown; +pub use linux_headers_asm_unistd::__NR_sendmsg; +pub use linux_headers_asm_unistd::__NR_recvmsg; +pub use linux_headers_asm_unistd::__NR_readahead; +pub use linux_headers_asm_unistd::__NR_brk; +pub use linux_headers_asm_unistd::__NR_munmap; +pub use linux_headers_asm_unistd::__NR_mremap; +pub use linux_headers_asm_unistd::__NR_add_key; +pub use linux_headers_asm_unistd::__NR_request_key; +pub use linux_headers_asm_unistd::__NR_keyctl; +pub use linux_headers_asm_unistd::__NR_clone; +pub use linux_headers_asm_unistd::__NR_execve; +pub use linux_headers_asm_unistd::__NR_mmap; +pub use linux_headers_asm_unistd::__NR_fadvise64; +pub use linux_headers_asm_unistd::__NR_swapon; +pub use linux_headers_asm_unistd::__NR_swapoff; +pub use linux_headers_asm_unistd::__NR_mprotect; +pub use linux_headers_asm_unistd::__NR_msync; +pub use linux_headers_asm_unistd::__NR_mlock; +pub use linux_headers_asm_unistd::__NR_munlock; +pub use linux_headers_asm_unistd::__NR_mlockall; +pub use linux_headers_asm_unistd::__NR_munlockall; +pub use linux_headers_asm_unistd::__NR_mincore; +pub use linux_headers_asm_unistd::__NR_madvise; +pub use linux_headers_asm_unistd::__NR_remap_file_pages; +pub use linux_headers_asm_unistd::__NR_mbind; +pub use linux_headers_asm_unistd::__NR_get_mempolicy; +pub use linux_headers_asm_unistd::__NR_set_mempolicy; +pub use linux_headers_asm_unistd::__NR_migrate_pages; +pub use linux_headers_asm_unistd::__NR_move_pages; +pub use linux_headers_asm_unistd::__NR_rt_tgsigqueueinfo; +pub use linux_headers_asm_unistd::__NR_perf_event_open; +pub use linux_headers_asm_unistd::__NR_accept4; +pub use linux_headers_asm_unistd::__NR_recvmmsg; +pub use linux_headers_asm_unistd::__NR_riscv_hwprobe; +pub use linux_headers_asm_unistd::__NR_riscv_flush_icache; +pub use linux_headers_asm_unistd::__NR_wait4; +pub use linux_headers_asm_unistd::__NR_prlimit64; +pub use linux_headers_asm_unistd::__NR_fanotify_init; +pub use linux_headers_asm_unistd::__NR_fanotify_mark; +pub use linux_headers_asm_unistd::__NR_name_to_handle_at; +pub use linux_headers_asm_unistd::__NR_open_by_handle_at; +pub use linux_headers_asm_unistd::__NR_clock_adjtime; +pub use linux_headers_asm_unistd::__NR_syncfs; +pub use linux_headers_asm_unistd::__NR_setns; +pub use linux_headers_asm_unistd::__NR_sendmmsg; +pub use linux_headers_asm_unistd::__NR_process_vm_readv; +pub use linux_headers_asm_unistd::__NR_process_vm_writev; +pub use linux_headers_asm_unistd::__NR_kcmp; +pub use linux_headers_asm_unistd::__NR_finit_module; +pub use linux_headers_asm_unistd::__NR_sched_setattr; +pub use linux_headers_asm_unistd::__NR_sched_getattr; +pub use linux_headers_asm_unistd::__NR_renameat2; +pub use linux_headers_asm_unistd::__NR_seccomp; +pub use linux_headers_asm_unistd::__NR_getrandom; +pub use linux_headers_asm_unistd::__NR_memfd_create; +pub use linux_headers_asm_unistd::__NR_bpf; +pub use linux_headers_asm_unistd::__NR_execveat; +pub use linux_headers_asm_unistd::__NR_userfaultfd; +pub use linux_headers_asm_unistd::__NR_membarrier; +pub use linux_headers_asm_unistd::__NR_mlock2; +pub use linux_headers_asm_unistd::__NR_copy_file_range; +pub use linux_headers_asm_unistd::__NR_preadv2; +pub use linux_headers_asm_unistd::__NR_pwritev2; +pub use linux_headers_asm_unistd::__NR_pkey_mprotect; +pub use linux_headers_asm_unistd::__NR_pkey_alloc; +pub use linux_headers_asm_unistd::__NR_pkey_free; +pub use linux_headers_asm_unistd::__NR_statx; +pub use linux_headers_asm_unistd::__NR_io_pgetevents; +pub use linux_headers_asm_unistd::__NR_rseq; +pub use linux_headers_asm_unistd::__NR_kexec_file_load; +pub use linux_headers_asm_unistd::__NR_pidfd_send_signal; +pub use linux_headers_asm_unistd::__NR_io_uring_setup; +pub use linux_headers_asm_unistd::__NR_io_uring_enter; +pub use linux_headers_asm_unistd::__NR_io_uring_register; +pub use linux_headers_asm_unistd::__NR_open_tree; +pub use linux_headers_asm_unistd::__NR_move_mount; +pub use linux_headers_asm_unistd::__NR_fsopen; +pub use linux_headers_asm_unistd::__NR_fsconfig; +pub use linux_headers_asm_unistd::__NR_fsmount; +pub use linux_headers_asm_unistd::__NR_fspick; +pub use linux_headers_asm_unistd::__NR_pidfd_open; +pub use linux_headers_asm_unistd::__NR_clone3; +pub use linux_headers_asm_unistd::__NR_close_range; +pub use linux_headers_asm_unistd::__NR_openat2; +pub use linux_headers_asm_unistd::__NR_pidfd_getfd; +pub use linux_headers_asm_unistd::__NR_faccessat2; +pub use linux_headers_asm_unistd::__NR_process_madvise; +pub use linux_headers_asm_unistd::__NR_epoll_pwait2; +pub use linux_headers_asm_unistd::__NR_mount_setattr; +pub use linux_headers_asm_unistd::__NR_quotactl_fd; +pub use linux_headers_asm_unistd::__NR_landlock_create_ruleset; +pub use linux_headers_asm_unistd::__NR_landlock_add_rule; +pub use linux_headers_asm_unistd::__NR_landlock_restrict_self; +pub use linux_headers_asm_unistd::__NR_memfd_secret; +pub use linux_headers_asm_unistd::__NR_process_mrelease; +pub use linux_headers_asm_unistd::__NR_futex_waitv; +pub use linux_headers_asm_unistd::__NR_set_mempolicy_home_node; +pub use linux_headers_asm_unistd::__NR_cachestat; +pub use linux_headers_asm_unistd::__NR_fchmodat2; +pub use linux_headers_asm_unistd::__NR_map_shadow_stack; +pub use linux_headers_asm_unistd::__NR_futex_wake; +pub use linux_headers_asm_unistd::__NR_futex_wait; +pub use linux_headers_asm_unistd::__NR_futex_requeue; +pub use linux_headers_asm_unistd::__NR_statmount; +pub use linux_headers_asm_unistd::__NR_listmount; +pub use linux_headers_asm_unistd::__NR_lsm_get_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_set_self_attr; +pub use linux_headers_asm_unistd::__NR_lsm_list_modules; +pub use linux_headers_asm_unistd::__NR_mseal; +mod linux_headers_asm_hwprobe; +pub use linux_headers_asm_hwprobe::riscv_hwprobe; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MVENDORID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MARCHID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MIMPID; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_BASE_BEHAVIOR; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_BASE_BEHAVIOR_IMA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_IMA_EXT_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_FD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_C; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_IMA_V; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICBOZ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZBKX; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKNH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVBC; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKG; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKNHB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKSH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVKT; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTNTL; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFH; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVFHMIN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZFA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZTSO; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZACAS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZICOND; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIHINTPAUSE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE32F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64X; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64F; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZVE64D; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZIMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCA; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCB; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCD; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZCMOP; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_EXT_ZAWRS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_CPUPERF_0; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_MASK; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_TIME_CSR_FREQ; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_FAST; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED; +pub use linux_headers_asm_hwprobe::RISCV_HWPROBE_WHICH_CPUS; +mod sys_auxv; +pub use sys_auxv::getauxval; +mod elf; +pub use elf::Elf32_auxv_t; +pub use elf::Elf64_auxv_t; +pub type c_char = u8; diff --git a/tests/helper/src/gen/sys/riscv64gc_linux_musl/sys_auxv.rs b/tests/helper/src/gen/sys/riscv64gc_linux_musl/sys_auxv.rs new file mode 100644 index 000000000..b6d1eb82f --- /dev/null +++ b/tests/helper/src/gen/sys/riscv64gc_linux_musl/sys_auxv.rs @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// This file is @generated by portable-atomic-internal-codegen +// (gen function at tools/codegen/src/ffi.rs). +// It is not intended for manual editing. + +extern "C" { + pub fn getauxval(arg1: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; +} diff --git a/tools/build.sh b/tools/build.sh index b57c32fb9..5369a2f50 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -585,6 +585,11 @@ build() { RUSTFLAGS="${target_rustflags} -C target-cpu=pwr7" \ x_cargo "${args[@]}" "$@" ;; + riscv64*) + CARGO_TARGET_DIR="${target_dir}/zacas" \ + RUSTFLAGS="${target_rustflags} -C target-feature=experimental-zacas" \ + x_cargo "${args[@]}" "$@" + ;; s390x*) CARGO_TARGET_DIR="${target_dir}/z196" \ RUSTFLAGS="${target_rustflags} -C target-cpu=z196" \ diff --git a/tools/codegen/src/ffi.rs b/tools/codegen/src/ffi.rs index 34390c11f..6359c8999 100644 --- a/tools/codegen/src/ffi.rs +++ b/tools/codegen/src/ffi.rs @@ -43,9 +43,9 @@ static TARGETS: &[Target] = &[ "powerpc64le-unknown-linux-gnu", "powerpc64-unknown-linux-musl", "powerpc64le-unknown-linux-musl", - // "riscv64gc-unknown-linux-gnu", - // "riscv64gc-unknown-linux-musl", - // "riscv64-linux-android", + "riscv64gc-unknown-linux-gnu", + "riscv64gc-unknown-linux-musl", + "riscv64-linux-android", ], headers: &[ Header {