Skip to content

Commit

Permalink
use sanitizer/tsan_interface_atomic.h
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer authored Nov 14, 2024
1 parent f0fddab commit fc3c9fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/portaudio/pa_memorybarrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@
*
****************/

#if defined(__APPLE__)
#if (__has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)) && __has_include(<sanitizer/tsan_interface_atomic.h>)

Check failure on line 63 in lib/portaudio/pa_memorybarrier.h

View workflow job for this annotation

GitHub Actions / Ubuntu 24.04

missing binary operator before token "("

Check failure on line 63 in lib/portaudio/pa_memorybarrier.h

View workflow job for this annotation

GitHub Actions / coverage

missing binary operator before token "("
# include <sanitizer/tsan_interface_atomic.h>
# warning Building under Thread Sanitizer!
# define PaUtil_FullMemoryBarrier() __tsan_atomic_thread_fence(__tsan_memory_order_seq_cst)
# define PaUtil_ReadMemoryBarrier() __tsan_atomic_thread_fence(__tsan_memory_order_acquire)
# define PaUtil_WriteMemoryBarrier() __tsan_atomic_thread_fence(__tsan_memory_order_release)
#elif defined(__APPLE__)
/* Support for the atomic library was added in C11.
*/
# if (__STDC_VERSION__ < 201112L) || defined(__STDC_NO_ATOMICS__)
Expand Down

0 comments on commit fc3c9fc

Please sign in to comment.