pub enum Syscall {
Yield {
which: usize,
param_a: usize,
param_b: usize,
},
Subscribe {
driver_number: usize,
subdriver_number: usize,
upcall_ptr: *mut (),
appdata: usize,
},
Command {
driver_number: usize,
subdriver_number: usize,
arg0: usize,
arg1: usize,
},
ReadWriteAllow {
driver_number: usize,
subdriver_number: usize,
allow_address: *mut u8,
allow_size: usize,
},
UserspaceReadableAllow {
driver_number: usize,
subdriver_number: usize,
allow_address: *mut u8,
allow_size: usize,
},
ReadOnlyAllow {
driver_number: usize,
subdriver_number: usize,
allow_address: *const u8,
allow_size: usize,
},
Memop {
operand: usize,
arg0: usize,
},
Exit {
which: usize,
completion_code: usize,
},
}
Expand description
Decoded system calls as defined in TRD104.
Variants§
Yield
Structure representing an invocation of the SyscallClass::Yield
system call class. which
is the Yield identifier value and address
is the no wait field.
Subscribe
Structure representing an invocation of the Subscribe system call class.
Fields
Command
Structure representing an invocation of the Command system call class.
Fields
ReadWriteAllow
Structure representing an invocation of the ReadWriteAllow system call class.
Fields
UserspaceReadableAllow
Structure representing an invocation of the UserspaceReadableAllow system call class that allows shared kernel and app access.
Fields
ReadOnlyAllow
Structure representing an invocation of the ReadOnlyAllow system call class.
Fields
Memop
Structure representing an invocation of the Memop system call class.
Exit
Structure representing an invocation of the Exit system call class.
Implementations§
source§impl Syscall
impl Syscall
sourcepub fn from_register_arguments(
syscall_number: u8,
r0: usize,
r1: usize,
r2: usize,
r3: usize,
) -> Option<Syscall>
pub fn from_register_arguments( syscall_number: u8, r0: usize, r1: usize, r2: usize, r3: usize, ) -> Option<Syscall>
Helper function for converting raw values passed back from an
application into a Syscall
type in Tock, representing an typed version
of a system call invocation. The method returns None if the values do
not specify a valid system call.
Different architectures have different ABIs for a process and the kernel to exchange data. The 32-bit ABI for CortexM and RISCV microcontrollers is specified in TRD104.
sourcepub fn driver_number(&self) -> Option<usize>
pub fn driver_number(&self) -> Option<usize>
Get the driver_number
for the syscall classes that use driver numbers.
sourcepub fn subdriver_number(&self) -> Option<usize>
pub fn subdriver_number(&self) -> Option<usize>
Get the subdriver_number
for the syscall classes that use sub driver
numbers.
Trait Implementations§
source§impl PartialEq for Syscall
impl PartialEq for Syscall
impl Copy for Syscall
impl StructuralPartialEq for Syscall
Auto Trait Implementations§
impl Freeze for Syscall
impl RefUnwindSafe for Syscall
impl !Send for Syscall
impl !Sync for Syscall
impl Unpin for Syscall
impl UnwindSafe for Syscall
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)