mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fixed build on Mac OS X
This commit is contained in:
parent
f71749f01d
commit
cd5b67ad7f
@ -52,6 +52,8 @@ void ThreadFuzzer::initConfiguration()
|
||||
{
|
||||
#if OS_LINUX
|
||||
num_cpus = get_nprocs();
|
||||
#else
|
||||
(void)num_cpus;
|
||||
#endif
|
||||
|
||||
initFromEnv(cpu_time_period_us, "THREAD_FUZZER_CPU_TIME_PERIOD_US");
|
||||
@ -75,6 +77,7 @@ void ThreadFuzzer::signalHandler(int)
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
#if OS_LINUX
|
||||
if (fuzzer.num_cpus > 0
|
||||
&& fuzzer.migrate_probability > 0
|
||||
&& std::bernoulli_distribution(fuzzer.migrate_probability)(thread_local_rng))
|
||||
@ -87,6 +90,7 @@ void ThreadFuzzer::signalHandler(int)
|
||||
|
||||
(void)sched_setaffinity(0, sizeof(set), &set);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fuzzer.sleep_probability > 0
|
||||
&& fuzzer.chaos_sleep_time_us > 0
|
||||
|
Loading…
Reference in New Issue
Block a user