aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/serialise.cc9
-rw-r--r--src/libutil/serialise.hh4
2 files changed, 6 insertions, 7 deletions
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 0bdeec0cd..6e53239f5 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -186,18 +186,17 @@ static DefaultStackAllocator defaultAllocatorSingleton;
StackAllocator *StackAllocator::defaultAllocator = &defaultAllocatorSingleton;
-std::shared_ptr<void> (*create_disable_gc)() = []() -> std::shared_ptr<void> {
+std::shared_ptr<void> (*create_coro_gc_hook)() = []() -> std::shared_ptr<void> {
return {};
};
/* This class is used for entry and exit hooks on coroutines */
class CoroutineContext {
-#if __APPLE__
- /* Disable GC when entering the coroutine on macOS, since it doesn't find the main thread stack in this case.
+ /* Disable GC when entering the coroutine without the boehm patch,
+ * since it doesn't find the main thread stack in this case.
* std::shared_ptr<void> performs type-erasure, so it will call the right
* deleter. */
- const std::shared_ptr<void> disable_gc = create_disable_gc();
-#endif
+ const std::shared_ptr<void> coro_gc_hook = create_coro_gc_hook();
public:
CoroutineContext() {};
~CoroutineContext() {};
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index b895db779..ba6dbf619 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -551,10 +551,10 @@ struct StackAllocator {
static StackAllocator *defaultAllocator;
};
-/* Disabling GC when entering a coroutine (on macos).
+/* Disabling GC when entering a coroutine (without the boehm patch).
mutable to avoid boehm gc dependency in libutil.
*/
-extern std::shared_ptr<void> (*create_disable_gc)();
+extern std::shared_ptr<void> (*create_coro_gc_hook)();
}