Bug#385917: glibc: [m68k] fix deadlock with pthread_spinlock
Package: glibc
Severity: important
Tags: patch
Hi,
stlport currectly produces a deadlock in its testsuite, due to a
deadlock in __pthread_spin_lock(). The attached patch fixes it.
bye, Roman
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: m68k
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.4.30
Locale: LANG=de_DE.UTF-8, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
---
glibc-2.3.6/linuxthreads/sysdeps/m68k/pspinlock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: glibc-2.3.6/linuxthreads/sysdeps/m68k/pspinlock.c
===================================================================
--- glibc-2.3.6/linuxthreads/sysdeps/m68k/pspinlock.c
+++ glibc-2.3.6/linuxthreads/sysdeps/m68k/pspinlock.c
@@ -25,7 +25,7 @@
int
__pthread_spin_lock (pthread_spinlock_t *lock)
{
- unsigned int val;
+ unsigned char val;
do
asm volatile ("tas %1; sne %0"
@@ -42,7 +42,7 @@ weak_alias (__pthread_spin_lock, pthread
int
__pthread_spin_trylock (pthread_spinlock_t *lock)
{
- unsigned int val;
+ unsigned char val;
asm volatile ("tas %1; sne %0"
: "=dm" (val), "=m" (*lock)
Reply to: