We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 270ff62 commit e08dea6Copy full SHA for e08dea6
library/std/src/sys/fs/vexos.rs
@@ -19,6 +19,12 @@ pub use unsupported_fs::{
19
#[derive(Debug)]
20
struct FileDesc(*mut vex_sdk::FIL);
21
22
+// SAFETY: VEXos's FDs can be used on a thread other than the one they were created on.
23
+unsafe impl Send for FileDesc {}
24
+// SAFETY: We assume an environment without threads (i.e. no RTOS).
25
+// (If there were threads, it is possible that a mutex would be required.)
26
+unsafe impl Sync for FileDesc {}
27
+
28
pub struct File {
29
fd: FileDesc,
30
}
0 commit comments