From af442a22d956464e7df703b290fa49d78dda3dfa Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 24 Sep 2017 11:13:37 +0200 Subject: executor, sys/windows: initial windows support --- executor/common_windows.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 executor/common_windows.h (limited to 'executor/common_windows.h') diff --git a/executor/common_windows.h b/executor/common_windows.h new file mode 100644 index 000000000..80c197a4a --- /dev/null +++ b/executor/common_windows.h @@ -0,0 +1,50 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +// This file is shared between executor and csource package. + +#include + +#define doexit exit +#define NORETURN + +#include "common.h" + +#if defined(SYZ_EXECUTOR) || defined(SYZ_HANDLE_SEGV) +static void install_segv_handler() +{ +} + +// TODO(dvyukov): implement me +#define NONFAILING(...) \ + __try { \ + __VA_ARGS__; \ + } __except (EXCEPTION_EXECUTE_HANDLER) { \ + } +#endif + +#if defined(SYZ_EXECUTOR) || (defined(SYZ_REPEAT) && defined(SYZ_WAIT_REPEAT)) +static uint64_t current_time_ms() +{ + return GetTickCount64(); +} +#endif + +#if defined(SYZ_EXECUTOR) +static void sleep_ms(uint64_t ms) +{ + Sleep(ms); +} +#endif + +#if defined(SYZ_EXECUTOR) || defined(SYZ_FAULT_INJECTION) +static int inject_fault(int nth) +{ + return 0; +} + +static int fault_injected(int fail_fd) +{ + return 0; +} +#endif -- cgit mrf-deployment