mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 11:35:46 +00:00
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
This commit is contained in:
parent
6deb1a0119
commit
e5a9f1c644
9 changed files with 63 additions and 122 deletions
|
@ -32,15 +32,8 @@ public:
|
|||
return available_count > 0;
|
||||
}
|
||||
|
||||
ResultVal<bool> Wait(bool wait_thread) override {
|
||||
bool wait = !IsAvailable();
|
||||
|
||||
if (wait && wait_thread) {
|
||||
Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_SEMA, this);
|
||||
AddWaitingThread(GetCurrentThread());
|
||||
}
|
||||
|
||||
return MakeResult<bool>(wait);
|
||||
ResultVal<bool> Wait() override {
|
||||
return MakeResult<bool>(!IsAvailable());
|
||||
}
|
||||
|
||||
ResultVal<bool> Acquire() override {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue