summaryrefslogtreecommitdiff
path: root/src/common/fiber.cpp
diff options
context:
space:
mode:
authorGravatar Fernando S2022-04-16 00:05:04 +0200
committerGravatar GitHub2022-04-16 00:05:04 +0200
commit34710065e84ccc3de4433b7dd0ffb569e14788b8 (patch)
tree5e96d11546befd9671dff252e8e9e8a693b0bd1a /src/common/fiber.cpp
parentMerge pull request #8190 from Docteh/palswap (diff)
parentcore: hle: kernel: k_thread: Rework dummy thread waiting. (diff)
downloadyuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.tar.gz
yuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.tar.xz
yuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.zip
Merge pull request #8172 from bunnei/kernel-mutex
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
Diffstat (limited to 'src/common/fiber.cpp')
-rw-r--r--src/common/fiber.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/fiber.cpp b/src/common/fiber.cpp
index 81b212e4b..177a74deb 100644
--- a/src/common/fiber.cpp
+++ b/src/common/fiber.cpp
@@ -2,9 +2,10 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <mutex>
6
5#include "common/assert.h" 7#include "common/assert.h"
6#include "common/fiber.h" 8#include "common/fiber.h"
7#include "common/spin_lock.h"
8#include "common/virtual_buffer.h" 9#include "common/virtual_buffer.h"
9 10
10#include <boost/context/detail/fcontext.hpp> 11#include <boost/context/detail/fcontext.hpp>
@@ -19,7 +20,7 @@ struct Fiber::FiberImpl {
19 VirtualBuffer<u8> stack; 20 VirtualBuffer<u8> stack;
20 VirtualBuffer<u8> rewind_stack; 21 VirtualBuffer<u8> rewind_stack;
21 22
22 SpinLock guard{}; 23 std::mutex guard;
23 std::function<void(void*)> entry_point; 24 std::function<void(void*)> entry_point;
24 std::function<void(void*)> rewind_point; 25 std::function<void(void*)> rewind_point;
25 void* rewind_parameter{}; 26 void* rewind_parameter{};