Skip to content

Commit c2f56ef

Browse files
committed
std: support RwLock and thread parking on TEEOS
1 parent 4e0baae commit c2f56ef

File tree

4 files changed

+6
-56
lines changed

4 files changed

+6
-56
lines changed

library/std/src/sys/sync/rwlock/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ cfg_select! {
1919
all(target_os = "windows", target_vendor = "win7"),
2020
all(target_vendor = "fortanix", target_env = "sgx"),
2121
target_os = "xous",
22+
target_os = "teeos",
2223
) => {
2324
mod queue;
2425
pub use queue::RwLock;
@@ -27,10 +28,6 @@ cfg_select! {
2728
mod solid;
2829
pub use solid::RwLock;
2930
}
30-
target_os = "teeos" => {
31-
mod teeos;
32-
pub use teeos::RwLock;
33-
}
3431
_ => {
3532
mod no_threads;
3633
pub use no_threads::RwLock;

library/std/src/sys/sync/rwlock/teeos.rs

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

library/std/src/sys/sync/thread_parking/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ cfg_select! {
3535
mod xous;
3636
pub use xous::Parker;
3737
}
38-
target_family = "unix" => {
38+
any(
39+
target_family = "unix",
40+
target_os = "teeos",
41+
) => {
3942
mod pthread;
4043
pub use pthread::Parker;
4144
}

src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Target for the TEEOS operating system.
66

77
TEEOS is a mini os run in TrustZone, for trusted/security apps. The kernel of TEEOS is HongMeng/ChCore micro kernel. The libc for TEEOS is a part of musl.
8-
It's very small that there is no RwLock, no network, no stdin, and no file system for apps in TEEOS.
8+
It's very small that there is no network, no stdin, and no file system for apps in TEEOS.
99

1010
Some abbreviation:
1111

0 commit comments

Comments
 (0)