mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-09-16 15:08:27 +00:00
kata-os-camkes: misc additions
- clear_request_cap to clear a request ipbuffer's cap - debug_assert_recv_path_{empty,cnode,frame} Change-Id: I25ad559c810fc063d95a4a9c0a15b9dbab9cbf3b GitOrigin-RevId: ee0af0dc3ab93b555a4f42cdfb8a2b7a6dd92dca
This commit is contained in:
@@ -164,6 +164,13 @@ impl Camkes {
|
||||
RequestCapCleanup {}
|
||||
}
|
||||
|
||||
// Clears any capability attached to a CAmkES RPC request msg.
|
||||
pub fn clear_request_cap() {
|
||||
unsafe {
|
||||
seL4_SetCap(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the capability attached to an seL4 IPC.
|
||||
pub fn get_request_cap() -> seL4_CPtr { unsafe { seL4_GetCap(0) } }
|
||||
|
||||
@@ -221,6 +228,17 @@ impl Camkes {
|
||||
);
|
||||
}
|
||||
|
||||
// debug_assert wrappers for the current recv_path.
|
||||
pub fn debug_assert_recv_path_empty(&self, tag: &str) {
|
||||
Self::debug_assert_slot_empty(tag, &self.get_current_recv_path());
|
||||
}
|
||||
pub fn debug_assert_recv_path_cnode(&self, tag: &str) {
|
||||
Self::debug_assert_slot_cnode(tag, &self.get_current_recv_path());
|
||||
}
|
||||
pub fn debug_assert_recv_path_frame(&self, tag: &str) {
|
||||
Self::debug_assert_slot_frame(tag, &self.get_current_recv_path());
|
||||
}
|
||||
|
||||
// Dumps the contents of the toplevel CNode to the serial console.
|
||||
pub fn capscan() -> seL4_Result {
|
||||
// TODO(sleffler): requires CONFIG_PRINTING in the kernel
|
||||
|
Reference in New Issue
Block a user