|
|
|
@ -22,11 +22,6 @@ SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) { |
|
|
|
evt->reset_type = reset_type; |
|
|
|
evt->name = std::move(name); |
|
|
|
|
|
|
|
if (reset_type == ResetType::Pulse) { |
|
|
|
LOG_ERROR(Kernel, "Unimplemented event reset type Pulse"); |
|
|
|
UNIMPLEMENTED(); |
|
|
|
} |
|
|
|
|
|
|
|
return evt; |
|
|
|
} |
|
|
|
|
|
|
|
@ -37,8 +32,7 @@ bool Event::ShouldWait(Thread* thread) const { |
|
|
|
void Event::Acquire(Thread* thread) { |
|
|
|
ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); |
|
|
|
|
|
|
|
// Release the event if it's not sticky...
|
|
|
|
if (reset_type != ResetType::Sticky) |
|
|
|
if (reset_type == ResetType::OneShot) |
|
|
|
signaled = false; |
|
|
|
} |
|
|
|
|
|
|
|
@ -51,4 +45,11 @@ void Event::Clear() { |
|
|
|
signaled = false; |
|
|
|
} |
|
|
|
|
|
|
|
void Event::WakeupAllWaitingThreads() { |
|
|
|
WaitObject::WakeupAllWaitingThreads(); |
|
|
|
|
|
|
|
if (reset_type == ResetType::Pulse) |
|
|
|
signaled = false; |
|
|
|
} |
|
|
|
|
|
|
|
} // namespace
|