diff options
author | Lioncash <mathew1800@gmail.com> | 2020-11-07 02:29:54 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-11-07 02:36:32 +0100 |
commit | 00fb79b2f3f49335543c57f1d27b057320f3ff05 (patch) | |
tree | 6a92120ea5b1c063165a295d2a8814c649522e9f /src/common/fiber.h | |
parent | Merge pull request #4891 from lioncash/clang2 (diff) | |
download | yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar.gz yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar.bz2 yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar.lz yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar.xz yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.tar.zst yuzu-00fb79b2f3f49335543c57f1d27b057320f3ff05.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/fiber.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h index 1a027be96..5323e8579 100644 --- a/src/common/fiber.h +++ b/src/common/fiber.h @@ -7,9 +7,6 @@ #include <functional> #include <memory> -#include "common/common_types.h" -#include "common/spin_lock.h" - #if !defined(_WIN32) && !defined(WIN32) namespace boost::context::detail { struct transfer_t; @@ -41,8 +38,8 @@ public: Fiber(const Fiber&) = delete; Fiber& operator=(const Fiber&) = delete; - Fiber(Fiber&&) = delete; - Fiber& operator=(Fiber&&) = delete; + Fiber(Fiber&&) = default; + Fiber& operator=(Fiber&&) = default; /// Yields control from Fiber 'from' to Fiber 'to' /// Fiber 'from' must be the currently running fiber. @@ -57,9 +54,7 @@ public: void Exit(); /// Changes the start parameter of the fiber. Has no effect if the fiber already started - void SetStartParameter(void* new_parameter) { - start_parameter = new_parameter; - } + void SetStartParameter(void* new_parameter); private: Fiber(); @@ -77,16 +72,7 @@ private: #endif struct FiberImpl; - - SpinLock guard{}; - std::function<void(void*)> entry_point; - std::function<void(void*)> rewind_point; - void* rewind_parameter{}; - void* start_parameter{}; - std::shared_ptr<Fiber> previous_fiber; std::unique_ptr<FiberImpl> impl; - bool is_thread_fiber{}; - bool released{}; }; } // namespace Common |