aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-11 03:00:52 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-11 03:00:52 +0000
commit07bccb46708982ee080a3a57033df6ad392b82a5 (patch)
tree7e9cb44d00bd3a21aa1f2922dbe1beee6b5d4279 /linuxthreads
parent671ab00dcc3eaa263ab225ac26e7fc6b7677b3d0 (diff)
downloadglibc-07bccb46708982ee080a3a57033df6ad392b82a5.tar
glibc-07bccb46708982ee080a3a57033df6ad392b82a5.tar.gz
glibc-07bccb46708982ee080a3a57033df6ad392b82a5.tar.bz2
glibc-07bccb46708982ee080a3a57033df6ad392b82a5.zip
Update.
2000-4-10 kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/stackinfo.h: New file.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog7
-rw-r--r--linuxthreads/sysdeps/sh/pspinlock.c6
-rw-r--r--linuxthreads/sysdeps/sh/pt-machine.h6
3 files changed, 13 insertions, 6 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 917ab715f1..805e837af5 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
+ test.
+ (__pthread_spin_trylock): Likewise.
+ * sysdeps/sh/pt-machine.h (testandset): Likewise.
+
2001-04-10 Ulrich Drepper <drepper@redhat.com>
* join.c (pthread_exit): Move code to new function __pthread_do_exit
diff --git a/linuxthreads/sysdeps/sh/pspinlock.c b/linuxthreads/sysdeps/sh/pspinlock.c
index 2da3bc42d4..3623cb5489 100644
--- a/linuxthreads/sysdeps/sh/pspinlock.c
+++ b/linuxthreads/sysdeps/sh/pspinlock.c
@@ -1,5 +1,5 @@
/* POSIX spinlock implementation. SH version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
: "=r" (val)
: "r" (lock)
: "memory");
- while (val != 0);
+ while (val == 0);
return 0;
}
@@ -47,7 +47,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
: "=r" (val)
: "r" (lock)
: "memory");
- return val ? EBUSY : 0;
+ return val ? 0 : EBUSY;
}
weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h
index a54fa12da8..cdffeceee6 100644
--- a/linuxthreads/sysdeps/sh/pt-machine.h
+++ b/linuxthreads/sysdeps/sh/pt-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent pthreads configuration and inline functions.
SuperH version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Niibe Yutaka <gniibe@m17n.org>.
@@ -32,11 +32,11 @@ testandset (int *spinlock)
__asm__ __volatile__(
"tas.b @%1\n\t"
"movt %0"
- : "=z" (ret)
+ : "=r" (ret)
: "r" (spinlock)
: "memory", "cc");
- return ret;
+ return (ret == 0);
}