summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-11-15 09:36:26 +0100
committerbunnei <bunneidev@gmail.com>2020-11-29 10:31:52 +0100
commit24cae76d16d7344154c1a507889e33793b369be7 (patch)
tree8b50b723fdba9f8060813db9476295cdac4dcba9 /src/common
parenthle: kernel: thread: Remove unused "Running" state. (diff)
downloadyuzu-24cae76d16d7344154c1a507889e33793b369be7.tar
yuzu-24cae76d16d7344154c1a507889e33793b369be7.tar.gz
yuzu-24cae76d16d7344154c1a507889e33793b369be7.tar.bz2
yuzu-24cae76d16d7344154c1a507889e33793b369be7.tar.lz
yuzu-24cae76d16d7344154c1a507889e33793b369be7.tar.xz
yuzu-24cae76d16d7344154c1a507889e33793b369be7.tar.zst
yuzu-24cae76d16d7344154c1a507889e33793b369be7.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fiber.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/fiber.cpp b/src/common/fiber.cpp
index 3978c8624..3c1eefcb7 100644
--- a/src/common/fiber.cpp
+++ b/src/common/fiber.cpp
@@ -5,6 +5,7 @@
#include "common/assert.h"
#include "common/fiber.h"
#include "common/spin_lock.h"
+#include "common/virtual_buffer.h"
#include <boost/context/detail/fcontext.hpp>
@@ -13,8 +14,10 @@ namespace Common {
constexpr std::size_t default_stack_size = 256 * 1024;
struct Fiber::FiberImpl {
- alignas(64) std::array<u8, default_stack_size> stack;
- alignas(64) std::array<u8, default_stack_size> rewind_stack;
+ FiberImpl() : stack{default_stack_size}, rewind_stack{default_stack_size} {}
+
+ VirtualBuffer<u8> stack;
+ VirtualBuffer<u8> rewind_stack;
SpinLock guard{};
std::function<void(void*)> entry_point;