kern: delete KWritableEvent, devirtualize KReadableEvent Signal/Clear
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
|
||||
namespace ams::kern {
|
||||
|
||||
void KReadableEvent::Initialize(KEvent *parent) {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
m_is_signaled = false;
|
||||
m_parent = parent;
|
||||
|
||||
if (m_parent != nullptr) {
|
||||
m_parent->Open();
|
||||
}
|
||||
}
|
||||
|
||||
bool KReadableEvent::IsSignaled() const {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
MESOSPHERE_ASSERT(KScheduler::IsSchedulerLockedByCurrentThread());
|
||||
@@ -27,6 +37,11 @@ namespace ams::kern {
|
||||
void KReadableEvent::Destroy() {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
if (m_parent) {
|
||||
{
|
||||
KScopedSchedulerLock sl;
|
||||
m_parent->OnReadableEventDestroyed();
|
||||
}
|
||||
|
||||
m_parent->Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user