Files
jsix/definitions/objects/process.def
Justin C. Miller d3c1d6cc34 [kernel] Add debug names to processes
To make debugging easier, add names to processes. These are arbitrary
and supplied by the caller of process_create. The max is 31 characters
in debug configuration, and 0 in release.
2024-08-12 19:40:20 -07:00

33 lines
883 B
Modula-2

import "objects/object.def"
# A ``process`` object represents a process running on the system, and allows
# control over the threads, handles, and virtual memory space of that process.
object process : object {
uid 0c69ee0b7502ba31
capabilities [
kill
create_thread
]
# Create a new empty process
method create [constructor] {
param name string
}
# Stop all threads and exit the given process
method kill [destructor cap:kill]
# Stop all threads and exit the current process
method exit [static noreturn] {
param result int64 # The result to retrun to the parent process
}
# Give the given process a handle that points to the same
# object as the specified handle.
method give_handle {
param target ref object [handle] # A handle in the caller process to send
}
}