summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-19 18:47:27 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-19 18:47:27 +0000
commitb99a3ee2223e29059b00616365625cc9c55a362e (patch)
treefadb156262dfb248b116e88bfcc09c52e9088ab1
parent4595829c99d5ac22a0b934140eb57e1e5fd62d93 (diff)
downloadglibc-b99a3ee2223e29059b00616365625cc9c55a362e.tar.gz
(__pthread_lock): Force lock->__status to be read from memory on every spin.
-rw-r--r--linuxthreads/spinlock.c1
1 files changed, 1 insertions, 0 deletions
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;