kernel: refactor dummy thread wakeups

This commit is contained in:
Liam 2022-10-23 05:24:38 -04:00
parent 99cefb62fd
commit 3980952ab8
5 changed files with 79 additions and 29 deletions

View file

@ -643,8 +643,9 @@ public:
// therefore will not block on guest kernel synchronization primitives. These methods handle
// blocking as needed.
void IfDummyThreadTryWait();
void IfDummyThreadEndWait();
void RequestDummyThreadWait();
void DummyThreadBeginWait();
void DummyThreadEndWait();
[[nodiscard]] uintptr_t GetArgument() const {
return argument;
@ -777,8 +778,7 @@ private:
bool is_single_core{};
ThreadType thread_type{};
StepState step_state{};
std::mutex dummy_wait_lock;
std::condition_variable dummy_wait_cv;
std::atomic<bool> dummy_thread_runnable{true};
// For debugging
std::vector<KSynchronizationObject*> wait_objects_for_debugging;