summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/synchronization.h
diff options
context:
space:
mode:
authorGravatar bunnei2021-01-11 14:36:26 -0800
committerGravatar GitHub2021-01-11 14:36:26 -0800
commiteb3cb54aa53e23af61afb9b7e35af28c9d37ae2a (patch)
tree56a80760bd0ba8ecd85dc8d9f09fb9e2068c91d4 /src/core/hle/kernel/synchronization.h
parentMerge pull request #5229 from Morph1984/fullscreen-opt (diff)
parenthle: kernel: thread: Preserve thread wait reason for debugging only. (diff)
downloadyuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.tar.gz
yuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.tar.xz
yuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.zip
Merge pull request #5266 from bunnei/kernel-synch
Rewrite KSynchronizationObject, KConditonVariable, and KAddressArbiter
Diffstat (limited to 'src/core/hle/kernel/synchronization.h')
-rw-r--r--src/core/hle/kernel/synchronization.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/core/hle/kernel/synchronization.h b/src/core/hle/kernel/synchronization.h
deleted file mode 100644
index 379f4b1d3..000000000
--- a/src/core/hle/kernel/synchronization.h
+++ /dev/null
@@ -1,44 +0,0 @@
1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <memory>
8#include <utility>
9#include <vector>
10
11#include "core/hle/kernel/object.h"
12#include "core/hle/result.h"
13
14namespace Core {
15class System;
16} // namespace Core
17
18namespace Kernel {
19
20class SynchronizationObject;
21
22/**
23 * The 'Synchronization' class is an interface for handling synchronization methods
24 * used by Synchronization objects and synchronization SVCs. This centralizes processing of
25 * such
26 */
27class Synchronization {
28public:
29 explicit Synchronization(Core::System& system);
30
31 /// Signals a synchronization object, waking up all its waiting threads
32 void SignalObject(SynchronizationObject& obj) const;
33
34 /// Tries to see if waiting for any of the sync_objects is necessary, if not
35 /// it returns Success and the handle index of the signaled sync object. In
36 /// case not, the current thread will be locked and wait for nano_seconds or
37 /// for a synchronization object to signal.
38 std::pair<ResultCode, Handle> WaitFor(
39 std::vector<std::shared_ptr<SynchronizationObject>>& sync_objects, s64 nano_seconds);
40
41private:
42 Core::System& system;
43};
44} // namespace Kernel