summaryrefslogtreecommitdiffstats
path: root/src/common/fiber.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/fiber.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h
index ab44905cf..812d6644a 100644
--- a/src/common/fiber.h
+++ b/src/common/fiber.h
@@ -10,6 +10,12 @@
#include "common/common_types.h"
#include "common/spin_lock.h"
+#ifndef _MSC_VER
+namespace boost::context::detail {
+ struct transfer_t;
+}
+#endif
+
namespace Common {
class Fiber {
@@ -31,9 +37,6 @@ public:
/// Only call from main thread's fiber
void Exit();
- /// Used internally but required to be public, Shall not be used
- void _start(void* parameter);
-
/// Changes the start parameter of the fiber. Has no effect if the fiber already started
void SetStartParameter(void* new_parameter) {
start_parameter = new_parameter;
@@ -42,6 +45,16 @@ public:
private:
Fiber();
+#ifdef _MSC_VER
+ void start();
+ static void FiberStartFunc(void* fiber_parameter);
+#else
+ void start(boost::context::detail::transfer_t& transfer);
+ static void FiberStartFunc(boost::context::detail::transfer_t transfer);
+#endif
+
+
+
struct FiberImpl;
SpinLock guard;