From f4803c5aaf9398907c3f73b4734ffdcfc24e4998 Mon Sep 17 00:00:00 2001 From: Andrei Safronov Date: Wed, 20 Oct 2021 23:33:53 +0300 Subject: [PATCH] newlib: fix clang atomics Correction of the SYNC_LOCK_* macros in stdatomic --- components/newlib/stdatomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/newlib/stdatomic.c b/components/newlib/stdatomic.c index 6089efd9ee..f41e9668cd 100644 --- a/components/newlib/stdatomic.c +++ b/components/newlib/stdatomic.c @@ -207,7 +207,7 @@ CLANG_DECLARE_ALIAS( __sync_val_compare_and_swap_ ## n ) *ptr = val; \ _ATOMIC_EXIT_CRITICAL(state); \ return ret; \ -} +} \ CLANG_DECLARE_ALIAS( __sync_lock_test_and_set_ ## n ) #define SYNC_LOCK_RELEASE(n, type) void CLANG_ATOMIC_SUFFIX(__sync_lock_release_ ## n) (type *ptr) \ @@ -215,7 +215,7 @@ CLANG_DECLARE_ALIAS( __sync_lock_test_and_set_ ## n ) unsigned state = _ATOMIC_ENTER_CRITICAL(); \ *ptr = 0; \ _ATOMIC_EXIT_CRITICAL(state); \ -} +} \ CLANG_DECLARE_ALIAS( __sync_lock_release_ ## n )