Revert 'Fix store-load ordering in AO_stack_pop_explicit_aux_acquire'
authorIvan Maidanski <ivmai@mail.ru>
Mon, 27 Mar 2017 07:17:28 +0000 (10:17 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 27 Mar 2017 07:17:28 +0000 (10:17 +0300)
This reverts commit 85dd735949d712fa5db4bde0f0fc74f15a624222.

As reported in issue #15, adding AO_nop_full to
AO_stack_pop_explicit_aux_acquire does not solve test_stack failure
on Power7.

src/atomic_ops_stack.c

index 6bd7cf0..d0356bc 100644 (file)
@@ -133,7 +133,7 @@ AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux * a)
   for (i = 0; ; )
     {
       if (PRECHECK(a -> AO_stack_bl[i])
-          AO_compare_and_swap(a->AO_stack_bl+i, 0, first))
+          AO_compare_and_swap_acquire(a->AO_stack_bl+i, 0, first))
         break;
       ++i;
       if ( i >= AO_BL_SIZE )
@@ -151,7 +151,6 @@ AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux * a)
   /* We need to make sure that first is still the first entry on the    */
   /* list.  Otherwise it's possible that a reinsertion of it was        */
   /* already started before we added the black list entry.              */
-  AO_nop_full(); /* TODO: Suboptimal on x86 */
 # if defined(__alpha__) && (__GNUC__ == 4)
     if (first != AO_load(list))
                         /* Workaround __builtin_expect bug found in     */