feat(kernel): add Delegate syscall for capability delegation
This commit is contained in:
@@ -193,4 +193,19 @@ impl<P: Platform> Kernel<P> {
|
||||
}
|
||||
self.scheduler.remove(tid);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn create_endpoint_for_test(&mut self) -> types::id::EndpointId {
|
||||
self.endpoints.create().expect("create endpoint")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn grant_cap_for_test(
|
||||
&mut self,
|
||||
pid: ProcessId,
|
||||
resource: Resource,
|
||||
permissions: PermissionSet,
|
||||
) -> CapSlot {
|
||||
self.grant_cap(pid, resource, permissions).expect("grant cap")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user