From: Ulrich Drepper Date: Mon, 19 Feb 2001 18:47:27 +0000 (+0000) Subject: (__pthread_lock): Force lock->__status to be read from memory on every spin. X-Git-Tag: cvs/glibc-2_2_3~372 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b99a3ee2223e29059b00616365625cc9c55a362e;p=thirdparty%2Fglibc.git (__pthread_lock): Force lock->__status to be read from memory on every spin. --- diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c index 63f2ed16932..f284b580d25 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;