Files
jsix/definitions/objects/endpoint.def
Justin C. Miller e0246df26b [kernel] Add automatic verification to syscalls
Since we have a DSL for specifying syscalls, we can create a verificaton
method for each syscall that can cover most argument (and eventually
capability) verification instead of doing it piecemeal in each syscall
implementation, which can be more error-prone.

Now a new _syscall_verify_* function exists for every syscall, which
calls the real implementation. The syscall table for the syscall handler
now maps to these verify functions.

Other changes:

- Updated the definition grammar to allow options to have a "key:value"
  style, to eventually support capabilities.
- Added an "optional" option for parameters that says a syscall will
  accept a null value.
- Some bonnibel fixes, as definition file changes weren't always
  properly causing updates in the build dep graph.
- The syscall implementation function signatures are no longer exposed
  in syscall.h. Also, the unused syscall enum has been removed.
2022-01-16 15:11:58 -08:00

33 lines
880 B
Modula-2

# Channels are objects that enable synchronous IPC of
# arbitrary-sized messages.
object endpoint : kobject {
uid c5882f24a4c03b7e
method create [constructor]
# Send a message on a channel. Blocks until the message
# is received.
method send {
param tag uint64
param data buffer
}
# Receieve a message on a channel. Blocks until a message
# is available.
method receive {
param tag uint64 [out]
param data buffer [out optional]
param timeout uint64 # Receive timeout in nanoseconds
}
# Send a message on a channel and then await a new message.
# Equivalent to calling send and then recieve, as a single
# operation.
method sendrecv {
param tag uint64 [inout]
param data buffer [inout]
param timeout uint64 # Receive timeout in nanoseconds
}
}