Skip to content
Snippets Groups Projects

make the userspace-rcu dependency optional

Merged Florian Fischer requested to merge make_liburcu_optional into master
All threads resolved!
Files
5
+ 8
4
@@ -8,7 +8,6 @@
// Non portable.
#include <sched.h> // for cpu_set_t, CPU_SET, CPU_ZERO
#include <sys/sysinfo.h> // for get_nprocs
#include <urcu.h> // for rcu_register_thread
#include <cstdlib> // for rand, srand, abort
#include <cstring>
@@ -23,9 +22,14 @@
#include "Fiber.hpp" // for Fiber
#include "RuntimeStrategy.hpp" // for RuntimeStrategy
#include "RuntimeStrategyStats.hpp" // for RuntimeStrategyStats
#include "emper-config.h" // IWYU pragma: keep
#include "lib/DebugUtil.hpp"
#include "strategies/ws/WsStrategy.hpp" // for WsStrategy, WsStrategy::INST...
#ifdef EMPER_LIBURCU
#include <urcu.h> // for rcu_register_thread
#endif
#ifndef NDEBUG
#include <syscall.h> // for SYS_gettid
#include <unistd.h> // for syscall
@@ -79,9 +83,9 @@ Runtime::Runtime(workerid_t workerCount, RuntimeStrategy& strategy, unsigned int
workerIds[i] = i;
auto thread_function = [](void* voidWorkerId) -> void* {
if constexpr (emper::LIBURCU) {
rcu_register_thread();
}
#ifdef EMPER_LIBURCU
rcu_register_thread();
#endif
return currentRuntime->workerLoop(voidWorkerId);
};
Loading