[zion] Move the final syscalls to the new format.
This commit is contained in:
parent
bd431b94ce
commit
1edd5023ce
10 changed files with 45 additions and 52 deletions
13
zion/syscall/capability.cpp
Normal file
13
zion/syscall/capability.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include "syscall/capability.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
z_err_t CapDuplicate(ZCapDuplicateReq* req) {
|
||||
auto& proc = gScheduler->CurrentProcess();
|
||||
auto cap = proc.GetCapability(req->cap_in);
|
||||
if (!cap) {
|
||||
return Z_ERR_CAP_NOT_FOUND;
|
||||
}
|
||||
*req->cap_out = proc.AddExistingCapability(cap);
|
||||
return Z_OK;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue