From b8bd991ee2f77d225913d41c57b9a420b4559900 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 30 Jul 2018 11:17:44 +0200 Subject: executor: make current_time_ms/sleep_ms Fix conditions for when current_time_ms/sleep_ms are used and make them static. --- executor/common.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'executor/common.h') diff --git a/executor/common.h b/executor/common.h index 1665ef2cd..5419599da 100644 --- a/executor/common.h +++ b/executor/common.h @@ -117,17 +117,17 @@ static void install_segv_handler() #endif #if !GOOS_windows -#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER static void sleep_ms(uint64 ms) { usleep(ms * 1000); } #endif -#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER #include -uint64 current_time_ms() +static uint64 current_time_ms() { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) @@ -597,7 +597,6 @@ static void loop() #else static void loop() { - (void)sleep_ms; execute_one(); } #endif -- cgit mrf-deployment