[Zion] Add the ability to delete a capability.

This commit is contained in:
Drew Galbraith 2023-11-19 17:53:56 -08:00
parent 2e08eb76ff
commit 7d48dd2b8b
6 changed files with 16 additions and 2 deletions

View file

@ -18,3 +18,11 @@ z_err_t CapDuplicate(ZCapDuplicateReq* req) {
cap->permissions() & req->perm_mask);
return glcr::OK;
}
z_err_t CapRelease(ZCapReleaseReq* req) {
auto& proc = gScheduler->CurrentProcess();
if (proc.ReleaseCapability(req->cap).empty()) {
return glcr::CAP_NOT_FOUND;
}
return glcr::OK;
}