(__pthread_lock): Force lock->__status to be read from memory on every spin.
authorUlrich Drepper <drepper@redhat.com>
Mon, 19 Feb 2001 18:47:27 +0000 (18:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 19 Feb 2001 18:47:27 +0000 (18:47 +0000)
linuxthreads/spinlock.c

index 63f2ed1..f284b58 100644 (file)
@@ -88,6 +88,7 @@ again:
          return;
        }
       }
+      __asm __volatile ("" : "=m" (lock->__status) : "0" (lock->__status));
     }
 
     lock->__spinlock += (spin_count - lock->__spinlock) / 8;