[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:
@@ -38,7 +38,8 @@ public:
|
||||
util::spinlock & get_lock() { return m_lock; }
|
||||
|
||||
/// Wake and clear out all threads.
|
||||
void clear();
|
||||
/// \arg value The value passed to thread::wake
|
||||
void clear(uint64_t value = 0);
|
||||
|
||||
private:
|
||||
/// Get rid of any exited threads that are next
|
||||
@@ -46,6 +47,6 @@ private:
|
||||
void pop_exited();
|
||||
|
||||
util::spinlock m_lock;
|
||||
util::deque<obj::thread*, 8> m_threads;
|
||||
util::deque<obj::thread*, 6> m_threads;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user