mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 17:14:28 -04:00
os: implement waitable management.
This implements waitable management for Events (and implements Events). It also refactors PM to use new Event/Waitable semantics, and also adds STS_ASSERT as a macro for asserting a boolean expression. The rest of stratosphere has been refactored to use STS_ASSERT whenever possible.
This commit is contained in:
parent
e07011be32
commit
609a302e16
108 changed files with 2752 additions and 1223 deletions
|
@ -34,7 +34,7 @@ namespace sts::dmnt::cheat::impl {
|
|||
os::Mutex cheat_lock;
|
||||
os::Event debug_events_event; /* Autoclear. */
|
||||
os::Thread detect_thread, debug_events_thread;
|
||||
IEvent *cheat_process_event;
|
||||
os::SystemEvent cheat_process_event;
|
||||
Handle cheat_process_debug_handle = INVALID_HANDLE;
|
||||
CheatProcessMetadata cheat_process_metadata = {};
|
||||
|
||||
|
@ -140,7 +140,7 @@ namespace sts::dmnt::cheat::impl {
|
|||
this->frozen_addresses_map.clear();
|
||||
|
||||
/* Signal to our fans. */
|
||||
this->cheat_process_event->Signal();
|
||||
this->cheat_process_event.Signal();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ namespace sts::dmnt::cheat::impl {
|
|||
public:
|
||||
CheatProcessManager() {
|
||||
/* Create cheat process detection event. */
|
||||
this->cheat_process_event = CreateWriteOnlySystemEvent();
|
||||
R_ASSERT(this->cheat_process_event.InitializeAsInterProcessEvent());
|
||||
|
||||
/* Learn whether we should enable cheats by default. */
|
||||
{
|
||||
|
@ -214,8 +214,8 @@ namespace sts::dmnt::cheat::impl {
|
|||
return this->HasActiveCheatProcess();
|
||||
}
|
||||
|
||||
Handle GetCheatProcessEventHandle() {
|
||||
return this->cheat_process_event->GetHandle();
|
||||
Handle GetCheatProcessEventHandle() const {
|
||||
return this->cheat_process_event.GetReadableHandle();
|
||||
}
|
||||
|
||||
Result GetCheatProcessMetadata(CheatProcessMetadata *out) {
|
||||
|
@ -710,7 +710,7 @@ namespace sts::dmnt::cheat::impl {
|
|||
this->debug_events_event.Signal();
|
||||
|
||||
/* Signal to our fans. */
|
||||
this->cheat_process_event->Signal();
|
||||
this->cheat_process_event.Signal();
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue