pub struct CycleCount<'a, P: CycleCounter> { /* private fields */ }
Implementations§
Source§impl<'a, P: CycleCounter> CycleCount<'a, P>
impl<'a, P: CycleCounter> CycleCount<'a, P>
pub fn new( counters: &'a P, grant: Grant<App, UpcallCount<0>, AllowRoCount<0>, AllowRwCount<0>>, ) -> Self
Trait Implementations§
Source§impl<P: CycleCounter> SyscallDriver for CycleCount<'_, P>
impl<P: CycleCounter> SyscallDriver for CycleCount<'_, P>
Source§fn command(
&self,
command_num: usize,
_data: usize,
_: usize,
processid: ProcessId,
) -> CommandReturn
fn command( &self, command_num: usize, _data: usize, _: usize, processid: ProcessId, ) -> CommandReturn
Control the CycleCount system.
§command_num
0
: Driver check.1
: Start the cycle counter.2
: Get current cycle count.3
: Reset and stop the cycle counter.4
: Stop the cycle counter.
Source§fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>
fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>
Request to allocate a capsule’s grant for a specific process. Read more
Source§fn allow_userspace_readable(
&self,
app: ProcessId,
which: usize,
slice: ReadWriteProcessBuffer,
) -> Result<ReadWriteProcessBuffer, (ReadWriteProcessBuffer, ErrorCode)>
fn allow_userspace_readable( &self, app: ProcessId, which: usize, slice: ReadWriteProcessBuffer, ) -> Result<ReadWriteProcessBuffer, (ReadWriteProcessBuffer, ErrorCode)>
System call for a process to pass a buffer (a
UserspaceReadableProcessBuffer
) to the kernel that the kernel can
either read or write. The kernel calls this method only after it checks
that the entire buffer is within memory the process can both read and
write. Read moreAuto Trait Implementations§
impl<'a, P> !Freeze for CycleCount<'a, P>
impl<'a, P> !RefUnwindSafe for CycleCount<'a, P>
impl<'a, P> !Send for CycleCount<'a, P>
impl<'a, P> !Sync for CycleCount<'a, P>
impl<'a, P> Unpin for CycleCount<'a, P>
impl<'a, P> !UnwindSafe for CycleCount<'a, P>
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
Mutably borrows from an owned value. Read more