summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/event.cpp
blob: 375660d728458e2145a2f467b54b3180835a8901 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#include "core/hle/kernel/k_event.h"
#include "core/hle/service/event.h"
#include "core/hle/service/kernel_helpers.h"

namespace Service {

Event::Event(KernelHelpers::ServiceContext& ctx) {
    m_event = ctx.CreateEvent("Event");
}

Event::~Event() {
    m_event->GetReadableEvent().Close();
    m_event->Close();
}

void Event::Signal() {
    m_event->Signal();
}

void Event::Clear() {
    m_event->Clear();
}

Kernel::KReadableEvent* Event::GetHandle() {
    return &m_event->GetReadableEvent();
}

} // namespace Service