1
1

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
Этот коммит содержится в:
Geoff Paulsen 2018-11-07 10:46:35 -06:00 коммит произвёл GitHub
родитель f17dcd5961 5efc76ef44
Коммит d99518c0d4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -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)