summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/event.cpp')
-rw-r--r--src/core/hle/kernel/event.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index e1f42af05..23f9df0d6 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -22,11 +22,6 @@ SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) {
22 evt->reset_type = reset_type; 22 evt->reset_type = reset_type;
23 evt->name = std::move(name); 23 evt->name = std::move(name);
24 24
25 if (reset_type == ResetType::Pulse) {
26 LOG_ERROR(Kernel, "Unimplemented event reset type Pulse");
27 UNIMPLEMENTED();
28 }
29
30 return evt; 25 return evt;
31} 26}
32 27
@@ -37,8 +32,7 @@ bool Event::ShouldWait(Thread* thread) const {
37void Event::Acquire(Thread* thread) { 32void Event::Acquire(Thread* thread) {
38 ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); 33 ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
39 34
40 // Release the event if it's not sticky... 35 if (reset_type == ResetType::OneShot)
41 if (reset_type != ResetType::Sticky)
42 signaled = false; 36 signaled = false;
43} 37}
44 38
@@ -51,4 +45,11 @@ void Event::Clear() {
51 signaled = false; 45 signaled = false;
52} 46}
53 47
48void Event::WakeupAllWaitingThreads() {
49 WaitObject::WakeupAllWaitingThreads();
50
51 if (reset_type == ResetType::Pulse)
52 signaled = false;
53}
54
54} // namespace 55} // namespace