summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/mutex.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-22 03:18:36 +0100
committerGitHub <noreply@github.com>2019-03-22 03:18:36 +0100
commit7b6d516faa788c25e26c79e2e5d19915f73983a5 (patch)
treed477c1598d78ad60360f2ab08d3b201fff9f38bd /src/core/hle/kernel/mutex.h
parentMerge pull request #2274 from lioncash/include (diff)
parentcore/hle/kernel/mutex: Remove usages of global system accessors (diff)
downloadyuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.gz
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.bz2
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.lz
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.xz
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.zst
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.zip
Diffstat (limited to 'src/core/hle/kernel/mutex.h')
-rw-r--r--src/core/hle/kernel/mutex.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h
index 81e62d497..b904de2e8 100644
--- a/src/core/hle/kernel/mutex.h
+++ b/src/core/hle/kernel/mutex.h
@@ -5,32 +5,34 @@
#pragma once
#include "common/common_types.h"
-#include "core/hle/kernel/object.h"
union ResultCode;
-namespace Kernel {
+namespace Core {
+class System;
+}
-class HandleTable;
-class Thread;
+namespace Kernel {
class Mutex final {
public:
+ explicit Mutex(Core::System& system);
+ ~Mutex();
+
/// Flag that indicates that a mutex still has threads waiting for it.
static constexpr u32 MutexHasWaitersFlag = 0x40000000;
/// Mask of the bits in a mutex address value that contain the mutex owner.
static constexpr u32 MutexOwnerMask = 0xBFFFFFFF;
/// Attempts to acquire a mutex at the specified address.
- static ResultCode TryAcquire(HandleTable& handle_table, VAddr address,
- Handle holding_thread_handle, Handle requesting_thread_handle);
+ ResultCode TryAcquire(VAddr address, Handle holding_thread_handle,
+ Handle requesting_thread_handle);
/// Releases the mutex at the specified address.
- static ResultCode Release(VAddr address);
+ ResultCode Release(VAddr address);
private:
- Mutex() = default;
- ~Mutex() = default;
+ Core::System& system;
};
} // namespace Kernel