Compiling with MSVC results in the error below: app/test/test_ring_perf.c(197): error C7712: address argument to atomic operation must be a pointer to an atomic integer, 'volatile unsigned int *' is not valid
The fix is to mark lcore_count as atomic when using C11 memory model. Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com> --- app/test/test_ring_perf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index 57cd04a124..3bb7577629 100644 --- a/app/test/test_ring_perf.c +++ b/app/test/test_ring_perf.c @@ -34,7 +34,11 @@ struct lcore_pair { unsigned c1, c2; }; -static volatile unsigned lcore_count = 0; +#ifdef RTE_USE_C11_MEM_MODEL +static RTE_ATOMIC(unsigned int) lcore_count; +#else +static volatile unsigned int lcore_count; +#endif static void test_ring_print_test_string(unsigned int api_type, int esize, -- 2.47.2.vfs.0.1