1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2020 Dmitry Kozlyuk
5 #ifndef _RTE_WINDOWS_H_
6 #define _RTE_WINDOWS_H_
9 * @file Windows-specific facilities
11 * This file should be included by DPDK libraries and applications
12 * that need access to Windows API. It includes platform SDK headers
13 * in compatible order with proper options and defines error-handling macros.
16 /* Disable excessive libraries. */
17 #ifndef WIN32_LEAN_AND_MEAN
18 #define WIN32_LEAN_AND_MEAN
21 /* Override Windows SDK definition of _m_prefetchw to avoid conflicting types */
22 #ifdef RTE_TOOLCHAIN_CLANG
24 #define _m_prefetchw __m_prefetchw
27 /* Must come first. */
35 /* Have GUIDs defined. */
44 * Log GetLastError() with context, usually a Win32 API function and arguments.
46 #define RTE_LOG_WIN32_ERR(...) \
47 RTE_LOG(DEBUG, EAL, RTE_FMT("GetLastError()=%lu: " \
48 RTE_FMT_HEAD(__VA_ARGS__,) "\n", GetLastError(), \
49 RTE_FMT_TAIL(__VA_ARGS__,)))
51 #endif /* _RTE_WINDOWS_H_ */