Add ability to get more storage information. (#637)

This adds parameters to the storage location syscalls to specify which
storage location to get the address and size for.
This commit is contained in:
Zach Halvorsen
2023-06-29 10:46:36 -07:00
committed by GitHub
parent f0e87ee813
commit a274a512f7
2 changed files with 8 additions and 8 deletions

View File

@@ -147,12 +147,12 @@ impl<S: Syscalls, C: platform::subscribe::Config + platform::allow_ro::Config> S
Ok(Self::memop(memop_nr::STORAGE_CNT, 0)? as usize)
}
pub fn storage_ptr() -> TockResult<usize> {
Ok(Self::memop(memop_nr::STORAGE_PTR, 0)? as usize)
pub fn storage_ptr(index: usize) -> TockResult<usize> {
Ok(Self::memop(memop_nr::STORAGE_PTR, index as u32)? as usize)
}
pub fn storage_len() -> TockResult<usize> {
Ok(Self::memop(memop_nr::STORAGE_LEN, 0)? as usize)
pub fn storage_len(index: usize) -> TockResult<usize> {
Ok(Self::memop(memop_nr::STORAGE_LEN, index as u32)? as usize)
}
pub fn storage_type(index: usize) -> TockResult<StorageType> {