Files
jsix/definitions/objects/mailbox.def
Justin C. Miller 1a04310f80 [kernel] Simplify mailbox code, and messages
A number of simplifications of mailboxes now that the interface is much
simpler, and synchronous.

* call and respond can now only transfer one handle at a time
* mailbox objects got rid of the message queue, and just have
  wait_queues of blocked threads, and a reply_to map.
* threads now have a message_data struct on them for use by mailboxes
2022-10-14 01:02:56 -07:00

37 lines
1.1 KiB
Modula-2

# Mailboxes are objects that enable synchronous IPC via short message-passing
# of tagged handles.
object mailbox : object {
uid 99934ad04ece1e07
capabilities [
send
receive
close
]
method create [constructor]
method close [destructor cap:close]
# Send a message to the reciever, and block until a
# response is sent. Note that getting this response
# does not require the receive capability.
method call [cap:send] {
param tag uint64 [inout]
param subtag uint64 [inout]
param give_handle ref object [inout handle]
}
# Respond to a message sent using call, and wait for another
# message to arrive. Note that this does not require the send
# capability. A reply tag of 0 skips the reply and goes directly
# to waiting for a new message.
method respond [cap:receive] {
param tag uint64 [inout]
param subtag uint64 [inout]
param give_handle ref object [inout handle]
param reply_tag uint64 [inout]
param flags uint64
}
}