mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
Fix semaphores and mutexes
This commit is contained in:
@@ -634,6 +634,11 @@ namespace
|
||||
break;
|
||||
|
||||
case handle_types::event: {
|
||||
if (h.value.is_pseudo)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
auto* e = c.events.get(h);
|
||||
if (e)
|
||||
{
|
||||
@@ -653,6 +658,16 @@ namespace
|
||||
break;
|
||||
}
|
||||
|
||||
case handle_types::semaphore: {
|
||||
auto* s = c.semaphores.get(h);
|
||||
if (s)
|
||||
{
|
||||
return s->try_lock();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case handle_types::thread: {
|
||||
const auto* t = c.threads.get(h);
|
||||
if (t)
|
||||
|
||||
Reference in New Issue
Block a user