tbb/tbb-2019-fetchadd4.patch

13 lines
617 B
Diff
Raw Normal View History

diff -up tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h.orig tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h
--- tbb-2020.1/src/tbb/tools_api/ittnotify_config.h.orig 2020-01-21 04:26:46.000000000 -0700
+++ tbb-2020.1/src/tbb/tools_api/ittnotify_config.h 2020-01-22 20:59:51.911673011 -0700
@@ -335,7 +335,7 @@ ITT_INLINE long
__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
{
- return __TBB_machine_fetchadd4(ptr, 1) + 1L;
+ return __atomic_fetch_add(ptr, 1L, __ATOMIC_SEQ_CST) + 1L;
}
#endif /* ITT_SIMPLE_INIT */