Skip to content

Commit

Permalink
std: move locks to sys on xous
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Feb 16, 2024
1 parent 6ee4510 commit f77c4d5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
3 changes: 3 additions & 0 deletions library/std/src/sys/locks/condvar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ cfg_if::cfg_if! {
} else if #[cfg(target_os = "teeos")] {
mod teeos;
pub use teeos::Condvar;
} else if #[cfg(target_os = "xous")] {
mod xous;
pub use xous::Condvar;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::mutex::Mutex;
use crate::os::xous::ffi::{blocking_scalar, scalar};
use crate::os::xous::services::{ticktimer_server, TicktimerScalar};
use crate::sys::locks::Mutex;
use crate::time::Duration;
use core::sync::atomic::{AtomicUsize, Ordering};

Expand Down
5 changes: 4 additions & 1 deletion library/std/src/sys/locks/mutex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cfg_if::cfg_if! {
pub use sgx::Mutex;
} else if #[cfg(target_os = "solid_asp3")] {
mod itron;
pub use itron::Condvar;
pub use itron::Mutex;
} else if #[cfg(target_os = "xous")] {
mod xous;
pub use xous::Mutex;
}
}
File renamed without changes.
3 changes: 3 additions & 0 deletions library/std/src/sys/locks/rwlock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ cfg_if::cfg_if! {
} else if #[cfg(target_os = "teeos")] {
mod teeos;
pub use teeos::RwLock;
} else if #[cfg(target_os = "xous")] {
mod xous;
pub use xous::RwLock;
}
}
File renamed without changes.
7 changes: 0 additions & 7 deletions library/std/src/sys/pal/xous/locks/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion library/std/src/sys/pal/xous/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub mod env;
pub mod fs;
#[path = "../unsupported/io.rs"]
pub mod io;
pub mod locks;
pub mod net;
pub mod os;
#[path = "../unsupported/pipe.rs"]
Expand Down

0 comments on commit f77c4d5

Please sign in to comment.