mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-22 13:57:53 -05:00
service/am: Implement EnterFatalSection and LeaveFatalSection
These functions act in tandem similar to how a lock or mutex require a balanced lock()/unlock() sequence. EnterFatalSection simply increments a counter for how many times it has been called, while LeaveFatalSection ensures that a previous call to EnterFatalSection has occured. If a previous call has occurred (the counter is not zero), then the counter gets decremented as one would expect. If a previous call has not occurred (the counter is zero), then an error code is returned.
This commit is contained in:
@ -119,6 +119,8 @@ public:
|
||||
private:
|
||||
void LockExit(Kernel::HLERequestContext& ctx);
|
||||
void UnlockExit(Kernel::HLERequestContext& ctx);
|
||||
void EnterFatalSection(Kernel::HLERequestContext& ctx);
|
||||
void LeaveFatalSection(Kernel::HLERequestContext& ctx);
|
||||
void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
|
||||
void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
|
||||
void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx);
|
||||
@ -135,6 +137,7 @@ private:
|
||||
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
|
||||
Kernel::EventPair launchable_event;
|
||||
u32 idle_time_detection_extension = 0;
|
||||
u64 num_fatal_sections_entered = 0;
|
||||
};
|
||||
|
||||
class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
|
||||
|
Reference in New Issue
Block a user