[kernel] Add object_wait_many syscall
Add the object_wait_many syscall to allow programs to wait for signals on multiple objects at once. Also removed the object argument to thread::wait_on_signals, which does nothing with it. That information is saved in the thread being in the object's blocked threads list.
This commit is contained in:
@@ -50,13 +50,11 @@ void
|
||||
kobject::notify_signal_observers()
|
||||
{
|
||||
size_t i = 0;
|
||||
bool readied = false;
|
||||
while (i < m_blocked_threads.count()) {
|
||||
thread *t = m_blocked_threads[i];
|
||||
|
||||
if (t->wake_on_signals(this, m_signals)) {
|
||||
m_blocked_threads.remove_swap_at(i);
|
||||
readied = true;
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user