[kernel] Add process_give_handle syscall

This syscall allows a process to give another process access to an
object it has a handle to. The value of the handle as seen in the
receiver process is returned to the caller, so that the caller may
notify the recipient which handle was given.
This commit is contained in:
Justin C. Miller
2022-01-15 09:37:55 -08:00
parent 4d9b33ecd4
commit 11eef8d892
2 changed files with 21 additions and 0 deletions

View File

@@ -24,4 +24,11 @@ object process : kobject {
param entrypoint address # The address of the main thread entrypoint
param handles object kobject [list] # A list of parent handles to send to the child process
}
# Give the given process a handle that points to the same
# object as the specified handle.
method give_handle {
param sender object kobject # A handle in the caller process to send
param receiver object kobject [out] # The handle as the recipient will see it
}
}