Skip to content

Commit c426d14

Browse files
committed
std: move locks to sys on xous
1 parent cb2a733 commit c426d14

File tree

8 files changed

+11
-10
lines changed

8 files changed

+11
-10
lines changed

std/src/sys/locks/condvar/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ cfg_if::cfg_if! {
2626
} else if #[cfg(target_os = "teeos")] {
2727
mod teeos;
2828
pub use teeos::Condvar;
29+
} else if #[cfg(target_os = "xous")] {
30+
mod xous;
31+
pub use xous::Condvar;
2932
}
3033
}

std/src/sys/pal/xous/locks/condvar.rs renamed to std/src/sys/locks/condvar/xous.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use super::mutex::Mutex;
21
use crate::os::xous::ffi::{blocking_scalar, scalar};
32
use crate::os::xous::services::{ticktimer_server, TicktimerScalar};
3+
use crate::sys::locks::Mutex;
44
use crate::time::Duration;
55
use core::sync::atomic::{AtomicUsize, Ordering};
66

std/src/sys/locks/mutex/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ cfg_if::cfg_if! {
2727
pub use sgx::Mutex;
2828
} else if #[cfg(target_os = "solid_asp3")] {
2929
mod itron;
30-
pub use itron::Condvar;
30+
pub use itron::Mutex;
31+
} else if #[cfg(target_os = "xous")] {
32+
mod xous;
33+
pub use xous::Mutex;
3134
}
3235
}
File renamed without changes.

std/src/sys/locks/rwlock/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ cfg_if::cfg_if! {
2626
} else if #[cfg(target_os = "teeos")] {
2727
mod teeos;
2828
pub use teeos::RwLock;
29+
} else if #[cfg(target_os = "xous")] {
30+
mod xous;
31+
pub use xous::RwLock;
2932
}
3033
}

std/src/sys/pal/xous/locks/mod.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

std/src/sys/pal/xous/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub mod env;
99
pub mod fs;
1010
#[path = "../unsupported/io.rs"]
1111
pub mod io;
12-
pub mod locks;
1312
pub mod net;
1413
pub mod os;
1514
#[path = "../unsupported/pipe.rs"]

0 commit comments

Comments
 (0)