On Tue, Feb 4, 2025 at 2:58 AM Andre Muezerie <andre...@linux.microsoft.com> wrote: > > MSVC does not support inline assembly, which is used by the > implementation of rte_atomic128_cmp_exchange and is needed > by the C11 flavor of lib/stack. > > A special implementation of rte_atomic128_cmp_exchange > compatible with MSVC is added to rte_stack_lf_c11.h. It uses an > intrinsic function when using MSVC, and inline assembly when other > compilers are used. > > Existing atomic tests (which are not C11 compatible) are > now skipped when using MSVC. > > v3: > * Isolated the additional implementation of rte_atomic128_cmp_exchange > to MSVC only. > > v2: > * Added MSVC compatible implementation of rte_atomic128_cmp_exchange > * Skipped non-C11 atomic tests when using MSVC > > Andre Muezerie (2): > test: disable non-C11 atomic tests for MSVC > stack: enable build with MSVC > > app/test/test_atomic.c | 2 ++ > lib/stack/meson.build | 6 ------ > lib/stack/rte_stack_lf_c11.h | 27 +++++++++++++++++++++++++++ > 3 files changed, 29 insertions(+), 6 deletions(-)
On the principle, the stack library should be reworked not to rely on the legacy API. But on the other hand, the stack library is the only consumer of this legacy API, and the change is small. So I decided to take this series for now. We can revisit when there are more users of 128 bits atomics. Series applied, thanks. -- David Marchand