mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
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.
35 lines
1.1 KiB
Modula-2
35 lines
1.1 KiB
Modula-2
import "objects/kobject.def"
|
|
|
|
# Processes are a collection of handles and a virtual memory
|
|
# space inside which threads are run.
|
|
|
|
object process : kobject {
|
|
uid 0c69ee0b7502ba31
|
|
|
|
# Create a new empty process
|
|
method create [constructor]
|
|
|
|
# Stop all threads and exit the given process
|
|
method kill [destructor]
|
|
|
|
# Stop all threads and exit the current process
|
|
method exit [static] {
|
|
param result int32 # The result to retrun to the parent process
|
|
}
|
|
|
|
# Start the given process running. Note that the entrypoint
|
|
# address must be specified in the address space of the new
|
|
# process.
|
|
method start {
|
|
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
|
|
}
|
|
}
|