#include #include #include #include #include #include namespace mesosphere { KSynchronizationObject::~KSynchronizationObject() { } void KSynchronizationObject::NotifyWaiters() { KScopedCriticalSection critical_section; if (IsSignaled()) { for (auto &&waiter : waiters) { waiter->HandleSyncObjectSignaled(this); } } } KLinkedList::const_iterator KSynchronizationObject::AddWaiter(KThread &thread) { return waiters.insert(waiters.end(), &thread); } void KSynchronizationObject::RemoveWaiter(KLinkedList::const_iterator it) { waiters.erase(it); } }