Merge pull request #6046 from hjelmn/v4.0.x_fix_a_memory_barrier_bug_that_is_totally_related_to_6014_but_in_the_pmix_code
pmix3x: fix potential memory barrier bug with __atomic builtin atomics
Этот коммит содержится в:
Коммит
d99518c0d4
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2016-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2018 Triad National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -58,7 +60,14 @@ static inline void pmix_atomic_mb(void)
|
||||
|
||||
static inline void pmix_atomic_rmb(void)
|
||||
{
|
||||
#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
|
||||
/* work around a bug in older gcc versions where ACQUIRE seems to get
|
||||
* treated as a no-op instead of being equivalent to
|
||||
* __asm__ __volatile__("": : :"memory") */
|
||||
__atomic_thread_fence (__ATOMIC_SEQ_CST);
|
||||
#else
|
||||
__atomic_thread_fence (__ATOMIC_ACQUIRE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void pmix_atomic_wmb(void)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user