|
@@ -4,10 +4,10 @@
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
#include <algorithm>
|
|
|
#include "common/assert.h"
|
|
#include "common/assert.h"
|
|
|
|
|
+#include "core/hle/kernel/errors.h"
|
|
|
#include "core/hle/kernel/object.h"
|
|
#include "core/hle/kernel/object.h"
|
|
|
#include "core/hle/kernel/readable_event.h"
|
|
#include "core/hle/kernel/readable_event.h"
|
|
|
#include "core/hle/kernel/thread.h"
|
|
#include "core/hle/kernel/thread.h"
|
|
|
-#include "core/hle/kernel/writable_event.h"
|
|
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
namespace Kernel {
|
|
|
|
|
|
|
@@ -34,6 +34,16 @@ void ReadableEvent::Clear() {
|
|
|
signaled = false;
|
|
signaled = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ResultCode ReadableEvent::Reset() {
|
|
|
|
|
+ if (!signaled) {
|
|
|
|
|
+ return ERR_INVALID_STATE;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Clear();
|
|
|
|
|
+
|
|
|
|
|
+ return RESULT_SUCCESS;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void ReadableEvent::WakeupAllWaitingThreads() {
|
|
void ReadableEvent::WakeupAllWaitingThreads() {
|
|
|
WaitObject::WakeupAllWaitingThreads();
|
|
WaitObject::WakeupAllWaitingThreads();
|
|
|
|
|
|