mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Simplify mailbox interface to call/respond
The only real usage of mailbox was mailbox_call or mailbox_respond_receive. This change simplifies the interface to just these syscalls.
This commit is contained in:
@@ -45,18 +45,6 @@ mailbox::close()
|
||||
m_queue.clear();
|
||||
}
|
||||
|
||||
void
|
||||
mailbox::send(message *msg)
|
||||
{
|
||||
util::scoped_lock lock {m_message_lock};
|
||||
m_messages.push_back(msg);
|
||||
|
||||
thread *t = m_queue.pop_next();
|
||||
|
||||
lock.release();
|
||||
if (t) t->wake(has_message);
|
||||
}
|
||||
|
||||
bool
|
||||
mailbox::call(message *msg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user