[kernel] Fix mailbox bugs

This commit contains a number of related mailbox issues:

- Add extra parameters to mailbox_respond_receive to allow both the
  number of bytes/handles passed in, and the size of the byte/handle
  buffers to be passed in.
- Don't delete mailbox messages on receipt if the caller is waiting on
  reply
- Correctly pass status messages along with a mailbox::replyer object
- Actually wake the calling thread in the mailbox::replyer dtor
- Make sure to release locks _before_ calling thread::wake() on blocked
  threads, as that may cause them to be scheduled ahead of the current
  thread.
This commit is contained in:
Justin C. Miller
2022-02-28 20:16:42 -08:00
parent b8684777e0
commit ef307e8ec6
5 changed files with 44 additions and 21 deletions

View File

@@ -55,9 +55,11 @@ object mailbox : object {
method respond_receive [cap:receive] {
param tag uint64 [inout]
param data buffer [inout zero_ok]
param data_in size
param handles ref object [inout list zero_ok]
param handles_in size
param reply_tag uint16 [inout]
param badge uint64 [out]
param badge uint64 [out optional]
param flags uint64
}
}