]> sourceware.org Git - glibc.git/blobdiff - linuxthreads/spinlock.c
Update.
[glibc.git] / linuxthreads / spinlock.c
index 6e7eb12e572ce37cde63d90ddae8230dad638d0a..ac94001bda7365aa350a8b4331d1c363b36f11d6 100644 (file)
@@ -56,7 +56,7 @@ void internal_function __pthread_lock(pthread_spinlock_t * lock,
       THREAD_SETMEM(self, p_nextlock, (pthread_descr) oldstatus);
       /* Make sure the store in p_nextlock completes before performing
          the compare-and-swap */
-      MEMORY_BARRIER();
+      WRITE_MEMORY_BARRIER();
     }
   } while(! compare_and_swap(&lock->__status, oldstatus, newstatus,
                              &lock->__spinlock));
@@ -198,7 +198,7 @@ int __pthread_compare_and_swap(long * ptr, long oldval, long newval,
     res = 0;
   }
   /* Prevent reordering of store to *ptr above and store to *spinlock below */
-  MEMORY_BARRIER();
+  WRITE_MEMORY_BARRIER();
   *spinlock = 0;
   return res;
 }
This page took 0.030084 seconds and 5 git commands to generate.