mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 08:54:31 -08:00
[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
This commit is contained in:
@@ -43,11 +43,11 @@ wait_queue::pop_next_unlocked()
|
||||
}
|
||||
|
||||
void
|
||||
wait_queue::clear()
|
||||
wait_queue::clear(uint64_t value)
|
||||
{
|
||||
util::scoped_lock lock {m_lock};
|
||||
for (auto *t : m_threads) {
|
||||
if (!t->exited()) t->wake();
|
||||
if (!t->exited()) t->wake(value);
|
||||
t->handle_release();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user