#include #include #include #include #include #include namespace mesosphere { KSynchronizationObject::~KSynchronizationObject() { } void KSynchronizationObject::Signal() { std::lock_guard criticalSection{KScheduler::GetCriticalSection()}; 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); } }