Message ID | 201202292148.58072.ebotcazou@adacore.com |
---|---|
State | New |
Headers | show |
From: Eric Botcazou <ebotcazou@adacore.com> Date: Wed, 29 Feb 2012 21:48:57 +0100 > As discussed with DaveM, this duplicates libitm's cpu_relax into libgomp. > > Tested on SPARC64/Linux, applied on the mainline. Thanks for taking care of this Eric.
Index: config/linux/sparc/futex.h =================================================================== --- config/linux/sparc/futex.h (revision 184585) +++ config/linux/sparc/futex.h (working copy) @@ -90,9 +90,5 @@ futex_wake (int *addr, int count) static inline void cpu_relax (void) { -#if defined __arch64__ || defined __sparc_v9__ - __asm volatile ("membar #LoadLoad" : : : "memory"); -#else - __asm volatile ("" : : : "memory"); -#endif + __asm volatile ("rd %%ccr, %%g0" : : : "memory"); }