From b99a3ee2223e29059b00616365625cc9c55a362e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Feb 2001 18:47:27 +0000 Subject: [PATCH] (__pthread_lock): Force lock->__status to be read from memory on every spin. --- linuxthreads/spinlock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c index 63f2ed1693..f284b580d2 100644 --- a/linuxthreads/spinlock.c +++ b/linuxthreads/spinlock.c @@ -88,6 +88,7 @@ again: return; } } + __asm __volatile ("" : "=m" (lock->__status) : "0" (lock->__status)); } lock->__spinlock += (spin_count - lock->__spinlock) / 8;