File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
src/hotspot/os_cpu/bsd_zero Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 2828
2929// Included in orderAccess.hpp header file.
3030
31- #ifdef ARM
32-
3331/*
3432 * ARM Kernel helper for memory barrier.
3533 * Using __asm __volatile ("":::"memory") does not work reliable on ARM
3937typedef void (__kernel_dmb_t ) (void );
4038#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0 )
4139
42- #define FULL_MEM_BARRIER __kernel_dmb ()
4340#define LIGHT_MEM_BARRIER __kernel_dmb ()
41+ #define FULL_MEM_BARRIER __kernel_dmb ()
4442
45- #else // ARM
46-
47- #define FULL_MEM_BARRIER __sync_synchronize ()
48-
49- #ifdef PPC
43+ #elif defined(PPC) // ----------------------------------------------------
5044
5145#ifdef __NO_LWSYNC__
5246#define LIGHT_MEM_BARRIER __asm __volatile (" sync" :::" memory" )
5347#else
5448#define LIGHT_MEM_BARRIER __asm __volatile (" lwsync" :::" memory" )
5549#endif
5650
57- #else // PPC
51+ #define FULL_MEM_BARRIER __sync_synchronize ()
52+
53+ #elif defined(X86) // ----------------------------------------------------
5854
5955#define LIGHT_MEM_BARRIER __asm __volatile (" " :::" memory" )
56+ #define FULL_MEM_BARRIER __sync_synchronize ()
57+
58+ #else // ----------------------------------------------------
59+
60+ // Default to strongest barriers for correctness.
6061
61- #endif // PPC
62+ #define LIGHT_MEM_BARRIER __sync_synchronize ()
63+ #define FULL_MEM_BARRIER __sync_synchronize ()
6264
63- #endif // ARM
65+ #endif // ----------------------------------------------------
6466
6567// Note: What is meant by LIGHT_MEM_BARRIER is a barrier which is sufficient
6668// to provide TSO semantics, i.e. StoreStore | LoadLoad | LoadStore.
You can’t perform that action at this time.
0 commit comments