eal/windows: add random function
authorPallavi Kadam <pallavi.kadam@intel.com>
Tue, 22 Dec 2020 00:45:10 +0000 (16:45 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 14 Jan 2021 22:21:40 +0000 (23:21 +0100)
commitedd66d57d55c9a19f0cf0a9d38fb1506573e5181
tree1663001cd9a83b5094db02de44adac8136489aa9
parent5881b2d2d904b4e35cb7f7d27bb8431a8bd906f8
eal/windows: add random function

The file rte_random.c is required to build i40e PMD on Windows.
Add rte_rand variable to export file.

Redefine _m_prefetchw for Clang toolchain due to following error
with respect to conflicting types:

FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
In file included from ../lib/librte_eal/common/rte_random.c:13:
In file included from ..\lib/librte_eal/include\rte_eal.h:20:
In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\um\windows.h:171:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\windef.h:24:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\minwindef.h:182:
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\
winnt.h:3324:1: error: conflicting types for '_m_prefetchw'
_m_prefetchw (
^
C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
note: previous definition is here
_m_prefetchw(void *__P)
^
1 error generated.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
lib/librte_eal/common/meson.build
lib/librte_eal/rte_eal_exports.def
lib/librte_eal/windows/include/rte_windows.h