Skip to content

Commit

Permalink
Merge pull request #598 from betrusted-io/rust-1.83-fixes
Browse files Browse the repository at this point in the history
Rust 1.83 fixes
  • Loading branch information
bunnie authored Dec 2, 2024
2 parents 4cf9c96 + e4a885e commit 625d7e6
Show file tree
Hide file tree
Showing 82 changed files with 498 additions and 482 deletions.
228 changes: 114 additions & 114 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions api/xous-api-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ authors = ["Sean Cross <[email protected]>"]
description = "Log server API"
edition = "2018"
name = "xous-api-log"
version = "0.1.61"
version = "0.1.62"
license = "MIT OR Apache-2.0"
repository = "https://github.com/betrusted-io/xous-core/"
homepage = "https://betrusted.io/xous-book/"

# Dependency versions enforced by Cargo.lock.
[dependencies]
xous = "0.9.64"
xous-ipc = "0.10.2"
xous-ipc = "0.10.3"
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }

[features]
Expand Down
8 changes: 4 additions & 4 deletions api/xous-api-names/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ authors = ["bunnie <[email protected]>"]
description = "Xous microkernel OS inter-process name resolution server"
edition = "2018"
name = "xous-api-names"
version = "0.9.63"
version = "0.9.64"
license = "MIT OR Apache-2.0"
repository = "https://github.com/betrusted-io/xous-core/"
homepage = "https://betrusted.io/"

# Dependency versions enforced by Cargo.lock.
[dependencies]
log-server = { package = "xous-api-log", version = "0.1.61" }
log-server = { package = "xous-api-log", version = "0.1.62" }
xous = "0.9.64"
xous-ipc = "0.10.2"
num-derive = { version = "0.3.3", default-features = false }
xous-ipc = "0.10.3"
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
log = "0.4.14"
rkyv = { version = "0.8.8", default-features = false, features = [
Expand Down
10 changes: 5 additions & 5 deletions api/xous-api-susres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xous-api-susres"
version = "0.9.61"
version = "0.9.62"
authors = ["bunnie <[email protected]>"]
edition = "2018"
description = "Manager of suspend/resume operations"
Expand All @@ -11,11 +11,11 @@ homepage = "https://betrusted.io/xous-book/"
# Dependency versions enforced by Cargo.lock.
[dependencies]
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
rkyv = { version = "0.8.8", default-features = false, features = [
"std",
Expand Down
12 changes: 6 additions & 6 deletions api/xous-api-ticktimer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ authors = ["bunnie <[email protected]>", "Sean Cross <[email protected]>"]
description = "Provide high-resolution, non-rollover system time"
edition = "2018"
name = "xous-api-ticktimer"
version = "0.9.61"
version = "0.9.62"
license = "MIT OR Apache-2.0"
repository = "https://github.com/betrusted-io/xous-core/"
homepage = "https://betrusted.io/xous-book/"

# Dependency versions enforced by Cargo.lock.
[dependencies]
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
susres = { package = "xous-api-susres", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
susres = { package = "xous-api-susres", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
log = "0.4.14"
rkyv = { version = "0.8.8", default-features = false, features = [
"std",
"alloc",
] }
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous-semver = "0.1.2"

Expand Down
10 changes: 5 additions & 5 deletions apps/app-loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ edition = "2021"

[dependencies]
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
log = "0.4.14"
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
modals = { path = "../../services/modals" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
locales = { path = "../../locales" }

num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }

rkyv = { version = "0.8.8", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion apps/app-loader/spawn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"

[dependencies]
xous = "0.9.64"
log-server = { package = "xous-api-log", version = "0.1.61", features = ["nostd"] }
log-server = { package = "xous-api-log", version = "0.1.62", features = ["nostd"] }
log = "0.4.17"
10 changes: 5 additions & 5 deletions apps/ball/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description = "Ball demo app"
# Dependency versions enforced by Cargo.lock.
[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
trng = { path = "../../services/trng" }
modals = { path = "../../services/modals" }
Expand Down
10 changes: 5 additions & 5 deletions apps/chat-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description = "Chat UI test routines"
# Dependency versions enforced by Cargo.lock.
[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
trng = { path = "../../services/trng" }
Expand Down
8 changes: 4 additions & 4 deletions apps/hello/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"

[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
locales = { path = "../../locales" }
Expand Down
8 changes: 4 additions & 4 deletions apps/hidv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"

[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
locales = { path = "../../locales" }
Expand Down
10 changes: 5 additions & 5 deletions apps/mtxchat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description = "Matrix chat"
# Dependency versions enforced by Cargo.lock.
[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
trng = { path = "../../services/trng" }
Expand Down
10 changes: 5 additions & 5 deletions apps/mtxcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description = "Matrix chat"
# Dependency versions enforced by Cargo.lock.
[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
trng = { path = "../../services/trng" }
Expand Down
10 changes: 5 additions & 5 deletions apps/repl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description = "REPL demo app"
# Dependency versions enforced by Cargo.lock.
[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
trng = { path = "../../services/trng" }
Expand Down
8 changes: 4 additions & 4 deletions apps/transientdisk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2021"

[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-ipc = "0.10.3"
log-server = { package = "xous-api-log", version = "0.1.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
usb-device-xous = { path = "../../services/usb-device-xous" }
Expand Down
12 changes: 6 additions & 6 deletions apps/vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ edition = "2018"

[dependencies]
log = "0.4.14"
num-derive = { version = "0.3.3", default-features = false }
num-derive = { version = "0.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
xous = "0.9.64"
xous-ipc = "0.10.2"
xous-ipc = "0.10.3"
rkyv = { version = "0.8.8", default-features = false, features = [
"std",
"alloc",
] }
log-server = { package = "xous-api-log", version = "0.1.61" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
log-server = { package = "xous-api-log", version = "0.1.62" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
gam = { path = "../../services/gam" }
graphics-server = { path = "../../services/graphics-server" }
locales = { path = "../../locales" }
Expand All @@ -24,15 +24,15 @@ xous-usb-hid = { git = "https://github.com/betrusted-io/xous-usb-hid.git", branc
pddb = { path = "../../services/pddb" }
modals = { path = "../../services/modals" }
trng = { path = "../../services/trng" }
susres = { package = "xous-api-susres", version = "0.9.61" }
susres = { package = "xous-api-susres", version = "0.9.62" }
ime-plugin-api = { path = "../../services/ime-plugin-api" }
content-plugin-api = { path = "../../services/content-plugin-api" } # all content canvas providers must provide this API
backup = { path = "libraries/backup" }
byteorder = { version = "1.4.3", default-features = false }
arrayref = "0.3.6"
subtle = { version = "2.5.0", features = ["core_hint_black_box"] }
rand_core = "0.6.3"
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.61" }
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.62" }
userprefs = { path = "../../libs/userprefs" }

# opensk
Expand Down
2 changes: 1 addition & 1 deletion apps/vault/libraries/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cbor = { path = "../cbor" }
arrayref = "0.3.6"
subtle = { version = "2.2.3", default-features = false }
trng = { path = "../../../../services/trng" }
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
rand_core = "0.6.3"
p256 = { version = "0.11.1", default-features = false, features = [
"ecdsa",
Expand Down
2 changes: 1 addition & 1 deletion imports/getrandom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ js-sys = { version = "0.3", optional = true }
wasm-bindgen-test = "0.3.18"

[target.'cfg(target_os = "xous")'.dependencies]
xous-names = { package = "xous-api-names", version = "0.9.63" }
xous-names = { package = "xous-api-names", version = "0.9.64" }
xous = "0.9.64"
rkyv = { version = "0.8.8", default-features = false, features = [
"std",
Expand Down
13 changes: 7 additions & 6 deletions kernel/src/arch/riscv/irq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static mut PREVIOUS_PAIR: Option<(PID, TID)> = None;
pub unsafe fn set_isr_return_pair(pid: PID, tid: TID) { PREVIOUS_PAIR = Some((pid, tid)); }

#[cfg(feature = "gdb-stub")]
pub unsafe fn take_isr_return_pair() -> Option<(PID, TID)> { PREVIOUS_PAIR.take() }
pub unsafe fn take_isr_return_pair() -> Option<(PID, TID)> { (&mut *(&raw mut PREVIOUS_PAIR)).take() }

/// Finish a pending ISR. Return `false` if there was none.
fn finish_isr() -> bool {
Expand All @@ -104,7 +104,7 @@ fn finish_isr() -> bool {
// we're in an interrupt context, it is safe to access this
// global variable.
let (previous_pid, previous_context) =
unsafe { PREVIOUS_PAIR.take().expect("got RETURN_FROM_ISR with no previous PID") };
unsafe { (&mut *(&raw mut PREVIOUS_PAIR)).take().expect("got RETURN_FROM_ISR with no previous PID") };
// println!(
// "ISR: Resuming previous pair of ({}, {})",
// previous_pid, previous_context
Expand Down Expand Up @@ -227,8 +227,9 @@ pub extern "C" fn trap_handler(
})
});

let response = crate::syscall::handle(pid, tid, unsafe { PREVIOUS_PAIR.is_some() }, call)
.unwrap_or_else(xous_kernel::Result::Error);
let response =
crate::syscall::handle(pid, tid, unsafe { (&mut *(&raw mut PREVIOUS_PAIR)).is_some() }, call)
.unwrap_or_else(xous_kernel::Result::Error);

// println!("Syscall Result: {:?}", response);
ArchProcess::with_current_mut(|p| {
Expand All @@ -251,15 +252,15 @@ pub extern "C" fn trap_handler(
// Safe to access globals since interrupts are disabled
// when this function runs.
unsafe {
if PREVIOUS_PAIR.is_none() {
if (&mut *(&raw mut PREVIOUS_PAIR)).is_none() {
let tid = crate::arch::process::current_tid();
// This is pretty verbose, so leave it commented out unless we're debugging a process
// transition
// #[cfg(feature = "debug-print")]
// if pid.get() != 1 {
// println!("Hardware IRQ set PID{:?}, TID{:?}", pid, tid);
// }
PREVIOUS_PAIR = Some((pid, tid));
*(&mut *(&raw mut PREVIOUS_PAIR)) = Some((pid, tid));
}
}
HANDLING_IRQ.store(true, Ordering::Relaxed);
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/debug/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ macro_rules! print {
#[allow(unused_unsafe)]
unsafe {
use core::fmt::Write;
if let Some(stream) = crate::debug::shell::OUTPUT.as_mut() {
if let Some(stream) = &mut *(&raw mut crate::debug::shell::OUTPUT) {
write!(stream, $($args)+).unwrap();
}
}
Expand Down
Loading

0 comments on commit 625d7e6

Please sign in to comment.