summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/synchronization.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-02-11 17:36:39 -0400
committerGravatar FernandoS272020-02-11 18:47:31 -0400
commitd23d504d776007c1244a85ac1b7bb67c407067b2 (patch)
treed6e992004bf752819084d648ca8b81fd1fc1db18 /src/core/hle/kernel/synchronization.h
parentKernel: Change WaitObject to Synchronization object. In order to better refle... (diff)
downloadyuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.gz
yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.xz
yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.zip
Kernel: Refactor synchronization to better match RE
Diffstat (limited to 'src/core/hle/kernel/synchronization.h')
-rw-r--r--src/core/hle/kernel/synchronization.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/hle/kernel/synchronization.h b/src/core/hle/kernel/synchronization.h
new file mode 100644
index 000000000..3417a9f13
--- /dev/null
+++ b/src/core/hle/kernel/synchronization.h
@@ -0,0 +1,34 @@
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
10#include "core/hle/kernel/object.h"
11#include "core/hle/result.h"
12
13namespace Core {
14class System;
15} // namespace Core
16
17namespace Kernel {
18
19class KernelCore;
20class SynchronizationObject;
21
22class Synchronization {
23public:
24 Synchronization(Core::System& system);
25
26 void SignalObject(SynchronizationObject& obj) const;
27
28 std::pair<ResultCode, Handle> WaitFor(
29 std::vector<std::shared_ptr<SynchronizationObject>>& sync_objects, s64 nano_seconds);
30
31private:
32 Core::System& system;
33};
34} // namespace Kernel