rust/library/std/src/sys/solid
Matthias Krüger 724cca6d7f
Rollup merge of #93847 - solid-rs:fix-kmc-solid-fs-ts, r=yaahc
kmc-solid: Use the filesystem thread-safety wrapper

Fixes the thread unsafety of the `std::fs` implementation used by the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.

Neither the SOLID filesystem API nor built-in filesystem drivers guarantee thread safety by default. Although this may suffice in general embedded-system use cases, and in fact the API can be used from multiple threads without any problems in many cases, this has been a source of unsoundness in `std::sys::solid::fs`.

This commit updates the implementation to leverage the filesystem thread-safety wrapper (which uses a pluggable synchronization mechanism) to enforce thread safety. This is done by prefixing all paths passed to the filesystem API with `\TS`. (Note that relative paths aren't supported in this platform.)
2022-02-18 23:23:07 +01:00
..
abi kmc-solid: Implement FileDesc::duplicate 2022-01-28 15:02:44 +09:00
alloc.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
env.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
error.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
fs.rs kmc-solid: Use the filesystem thread-safety wrapper 2022-02-10 13:33:35 +09:00
io.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
memchr.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
mod.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
net.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
os.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
path.rs Fix absolute issues 2022-02-08 14:57:35 +00:00
rwlock.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
stdio.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
thread_local_dtor.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
thread_local_key.rs Add SOLID targets 2021-09-28 11:31:47 +09:00
time.rs kmc-solid: SOLID_RTC_TIME::tm_mon is 1-based 2022-01-31 11:59:13 +09:00