mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 18:05:46 +00:00
Kernel: Refactor synchronization to better match RE
This commit is contained in:
parent
3a7f539463
commit
1ee7a4d926
23 changed files with 212 additions and 80 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/hle/kernel/synchronization.h"
|
||||
#include "core/hle/kernel/synchronization_object.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
|
||||
|
@ -18,6 +19,10 @@ namespace Kernel {
|
|||
SynchronizationObject::SynchronizationObject(KernelCore& kernel) : Object{kernel} {}
|
||||
SynchronizationObject::~SynchronizationObject() = default;
|
||||
|
||||
void SynchronizationObject::Signal() {
|
||||
kernel.Synchronization().SignalObject(*this);
|
||||
}
|
||||
|
||||
void SynchronizationObject::AddWaitingThread(std::shared_ptr<Thread> thread) {
|
||||
auto itr = std::find(waiting_threads.begin(), waiting_threads.end(), thread);
|
||||
if (itr == waiting_threads.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue