Implement KCriticalSection (mostly)

This commit is contained in:
TuxSH
2018-11-08 01:04:06 +01:00
committed by Michael Scire
parent 4238d2e97f
commit 0fb40d1ef5
12 changed files with 115 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
#include <mesosphere/processes/KWritableEvent.hpp>
#include <mesosphere/processes/KReadableEvent.hpp>
#include <mesosphere/processes/KEvent.hpp>
#include <mesosphere/threading/KScheduler.hpp>
#include <mesosphere/threading/KScopedCriticalSection.hpp>
namespace mesosphere
{
@@ -18,12 +18,12 @@ KReadableEvent::~KReadableEvent()
Result KReadableEvent::Signal()
{
KScopedCriticalSection criticalSection{};
if (!this->isSignaled) {
this->isSignaled = true;
NotifyWaiters();
}
return ResultSuccess();
}