[dpdk-dev] [PATCH v2 2/6] eal: add header files to support windows

Anand Rawat anand.rawat at intel.com
Thu Mar 7 04:27:00 CET 2019


On 3/6/2019 3:31 AM, Thomas Monjalon wrote:
> 06/03/2019 05:16, Anand Rawat:
>> Added header files to support windows on x86 platforms.
>> Updated rte_config to include rte_windows.h for windows
>> build.
> [...]
>> --- a/config/rte_config.h
>> +++ b/config/rte_config.h
>> +/* windows specific*/
>> +#ifdef RTE_EXEC_ENV_WINDOWS
>> +#include <rte_windows.h>
>> +#endif
> 
> Include in the config file looks wrong. >
>> --- /dev/null
>> +++ b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h
> 
> I think we could remove the sub-directory exec-env.
> Could we include this file from rte_common.h?
rte_windows.h defines types and substitution macros which are
needed to support common code on windows. So it should be
included as a global include for every library on windows.
rte_common.h is not included in all the source code and headers
we currently build for windows.

> 
>> @@ -0,0 +1,23 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2019 Intel Corporation
>> + */
>> +
>> +#ifndef _RTE_WINDOWS_H_
>> +#define _RTE_WINDOWS_H_
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +#define __extension__
>> +#define __thread __declspec(thread)
>> +
>> +#define strerror_r(a, b, c) strerror_s(b, c, a)
>> +
>> +typedef void *ssize_t;
>> +
>> +#ifdef __cplusplus
>> +}
>> +#endif
>> +
>> +#endif /* _RTE_WINDOWS_H_ */
> 
> It is missing comments to explain the need of each line.
> 
> 

Will be done in v3

-- 
Anand Rawat


More information about the dev mailing list