mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-31 13:09:38 +00:00 
			
		
		
		
	newlib: fix clang atomics
Correction of the SYNC_LOCK_* macros in stdatomic
This commit is contained in:
		 Andrei Safronov
					Andrei Safronov
				
			
				
					committed by
					
						 Scott Mabin
						Scott Mabin
					
				
			
			
				
	
			
			
			 Scott Mabin
						Scott Mabin
					
				
			
						parent
						
							710c1f2fad
						
					
				
				
					commit
					6a57c4d5d5
				
			| @@ -207,7 +207,7 @@ CLANG_DECLARE_ALIAS( __sync_val_compare_and_swap_ ## n ) | |||||||
|     *ptr = val;                                                                  \ |     *ptr = val;                                                                  \ | ||||||
|     _ATOMIC_EXIT_CRITICAL(state);                                                \ |     _ATOMIC_EXIT_CRITICAL(state);                                                \ | ||||||
|     return ret;                                                                  \ |     return ret;                                                                  \ | ||||||
| } | }                                                                                \ | ||||||
| CLANG_DECLARE_ALIAS( __sync_lock_test_and_set_ ## n ) | 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) \ | #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();                                   \ |     unsigned state = _ATOMIC_ENTER_CRITICAL();                                   \ | ||||||
|     *ptr = 0;                                                                    \ |     *ptr = 0;                                                                    \ | ||||||
|     _ATOMIC_EXIT_CRITICAL(state);                                                \ |     _ATOMIC_EXIT_CRITICAL(state);                                                \ | ||||||
| } | }                                                                                \ | ||||||
| CLANG_DECLARE_ALIAS( __sync_lock_release_ ## n ) | CLANG_DECLARE_ALIAS( __sync_lock_release_ ## n ) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user