mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
The new "noreturn" option tag on syscall methods causes those methods to be generated with [[noreturn]] / _Noreturn to avoid clang complaining that other functions marked noreturn, like exit(), because it can't tell that the syscall never returns.
32 lines
883 B
Modula-2
32 lines
883 B
Modula-2
import "objects/object.def"
|
|
|
|
# Processes are a collection of handles and a virtual memory
|
|
# space inside which threads are run.
|
|
|
|
object process : object {
|
|
uid 0c69ee0b7502ba31
|
|
|
|
capabilities [
|
|
kill
|
|
create_thread
|
|
]
|
|
|
|
# Create a new empty process
|
|
method create [constructor]
|
|
|
|
# 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 int32 # 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
|
|
param received ref object [out optional] # The handle as the recipient will see it
|
|
}
|
|
}
|