diff --git a/Cargo.toml b/Cargo.toml index ffce4f3241bda..40e8391110c13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,12 +86,14 @@ targets = [ "riscv32i-unknown-none-elf", "riscv32imac-unknown-none-elf", "riscv32imc-unknown-none-elf", + "riscv32-wrs-vxworks", "riscv64gc-unknown-freebsd", "riscv64gc-unknown-hermit", "riscv64gc-unknown-linux-gnu", "riscv64gc-unknown-linux-musl", "riscv64gc-unknown-none-elf", "riscv64imac-unknown-none-elf", + "riscv64-wrs-vxworks", "s390x-unknown-linux-gnu", "s390x-unknown-linux-musl", "sparc-unknown-linux-gnu", diff --git a/ci/build.sh b/ci/build.sh index 722626b43d686..d7d7b9f1bb7d3 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -249,11 +249,13 @@ riscv32i-unknown-none-elf \ riscv32imac-unknown-none-elf \ riscv32imc-unknown-none-elf \ riscv32gc-unknown-linux-gnu \ +riscv32-wrs-vxworks \ riscv64gc-unknown-freebsd \ riscv64gc-unknown-hermit \ riscv64gc-unknown-linux-musl \ riscv64gc-unknown-none-elf \ riscv64imac-unknown-none-elf \ +riscv64-wrs-vxworks \ s390x-unknown-linux-musl \ sparc-unknown-linux-gnu \ sparc64-unknown-netbsd \ diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index fc2aa5e51ae4c..efec114d052f4 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -1878,8 +1878,8 @@ extern "C" { pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; // vxCpuLib.h - fn vxCpuEnabledGet() -> ::cpuset_t; // Get set of running CPU's in the system - fn vxCpuConfiguredGet() -> ::cpuset_t; // Get set of Configured CPU's in the system + pub fn vxCpuEnabledGet() -> ::cpuset_t; // Get set of running CPU's in the system + pub fn vxCpuConfiguredGet() -> ::cpuset_t; // Get set of Configured CPU's in the system } //Dummy functions, these don't really exist in VxWorks. @@ -1972,6 +1972,12 @@ cfg_if! { } else if #[cfg(target_arch = "powerpc64")] { mod powerpc64; pub use self::powerpc64::*; + } else if #[cfg(target_arch = "riscv32")] { + mod riscv32; + pub use self::riscv32::*; + } else if #[cfg(target_arch = "riscv64")] { + mod riscv64; + pub use self::riscv64::*; } else { // Unknown target_arch } diff --git a/src/vxworks/riscv32.rs b/src/vxworks/riscv32.rs new file mode 100644 index 0000000000000..e617bb83c6ce3 --- /dev/null +++ b/src/vxworks/riscv32.rs @@ -0,0 +1,4 @@ +pub type c_char = i8; +pub type wchar_t = i32; +pub type c_long = i32; +pub type c_ulong = u32; diff --git a/src/vxworks/riscv64.rs b/src/vxworks/riscv64.rs new file mode 100644 index 0000000000000..5e95ea2567ddf --- /dev/null +++ b/src/vxworks/riscv64.rs @@ -0,0 +1,4 @@ +pub type c_char = i8; +pub type wchar_t = i32; +pub type c_long = i64; +pub type c_ulong = u64;