diff --git a/mission_rust/src/fsrc/store.rs b/mission_rust/src/fsrc/store.rs new file mode 100644 index 0000000..2355c72 --- /dev/null +++ b/mission_rust/src/fsrc/store.rs @@ -0,0 +1,38 @@ +use crate::check_global_threading_available; + +struct Store{ + mutex: crate::fsrc::mutex::RawMutex +} + +trait StoreBackend { + +} + +struct StoreAccessor { + mutex: crate::fsrc::mutex::RawMutex +} + +impl Store { + pub fn get_accessor(&self) -> StoreAccessor { + check_global_threading_available!(); + StoreAccessor{mutex: self.mutex.clone()} + } +} + +struct StoreSlot{ + data: *mut [u8] +} + +impl StoreSlot { + pub fn get_data(&self) -> &[u8] { + check_global_threading_available!(); + unsafe{&(*self.data)} + } + + pub fn get_all_data(&self) -> &[u8] { + check_global_threading_available!(); + unsafe{&(*self.data)} + } + + +} \ No newline at end of file