summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/lock_accessor.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-31 02:51:23 +0100
committerLiam <byteslice@airmail.cc>2024-01-30 00:43:45 +0100
commit7de6b410305fcfcd34078e62fbe0ceedb43663f9 (patch)
treeb5f3dc0d7631852a64466f3765e62e0707b8d0c8 /src/core/hle/service/am/lock_accessor.h
parentMerge pull request #12846 from german77/mii_const (diff)
downloadyuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar.gz
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar.bz2
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar.lz
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar.xz
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.tar.zst
yuzu-7de6b410305fcfcd34078e62fbe0ceedb43663f9.zip
Diffstat (limited to 'src/core/hle/service/am/lock_accessor.h')
-rw-r--r--src/core/hle/service/am/lock_accessor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/hle/service/am/lock_accessor.h b/src/core/hle/service/am/lock_accessor.h
new file mode 100644
index 000000000..626f60e07
--- /dev/null
+++ b/src/core/hle/service/am/lock_accessor.h
@@ -0,0 +1,28 @@
+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "core/hle/service/kernel_helpers.h"
+#include "core/hle/service/service.h"
+
+namespace Service::AM {
+
+class ILockAccessor final : public ServiceFramework<ILockAccessor> {
+public:
+ explicit ILockAccessor(Core::System& system_);
+ ~ILockAccessor() override;
+
+private:
+ void TryLock(HLERequestContext& ctx);
+ void Unlock(HLERequestContext& ctx);
+ void GetEvent(HLERequestContext& ctx);
+ void IsLocked(HLERequestContext& ctx);
+
+ bool is_locked{};
+
+ Kernel::KEvent* lock_event;
+ KernelHelpers::ServiceContext service_context;
+};
+
+} // namespace Service::AM