about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-05 18:10:14 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-05 18:10:14 +0000
commit172b90bbf6d68cfea568151bff7c1a96b277162b (patch)
tree3c3e70e1efeea09fba3c840440a80a0bff4b64ef /linuxthreads
parent619166175d502f8c71f93bb9ec33db558301cd9d (diff)
downloadglibc-172b90bbf6d68cfea568151bff7c1a96b277162b.tar.gz
glibc-172b90bbf6d68cfea568151bff7c1a96b277162b.tar.xz
glibc-172b90bbf6d68cfea568151bff7c1a96b277162b.zip
Update.
2000-10-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: New file.

2000-10-02  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/svc_udp.c (svcudp_recv): Set msg_controllen to all
	remaining xp_pad space.

2000-10-05  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-close.c (_dl_close): Check imap's l_flags_1 for
	DF_1_NODELETE, not list[i]'s.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/mutex.c16
2 files changed, 20 insertions, 2 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 4dce416150..dc0a248a6f 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2000-10-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* mutex.c (__pthread_mutex_destroy): Correct test of
+	busy mutex for mutexes using alternate fastlocks.
+	Patch by dtc@cmucl.cons.org.
+
 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
 
 	* sysdeps/s390/pt-machine.h: Make %a0 the thread register.
diff --git a/linuxthreads/mutex.c b/linuxthreads/mutex.c
index 9b4a3c7f56..5955c575d9 100644
--- a/linuxthreads/mutex.c
+++ b/linuxthreads/mutex.c
@@ -38,8 +38,20 @@ strong_alias (__pthread_mutex_init, pthread_mutex_init)
 
 int __pthread_mutex_destroy(pthread_mutex_t * mutex)
 {
-  if ((mutex->__m_lock.__status & 1) != 0) return EBUSY;
-  return 0;
+  switch (mutex->__m_kind) {
+  case PTHREAD_MUTEX_ADAPTIVE_NP:
+  case PTHREAD_MUTEX_RECURSIVE_NP:
+    if ((mutex->__m_lock.__status & 1) != 0)
+      return EBUSY;
+    return 0;
+  case PTHREAD_MUTEX_ERRORCHECK_NP:
+  case PTHREAD_MUTEX_TIMED_NP:
+    if (mutex->__m_lock.__status != 0)
+      return EBUSY;
+    return 0;
+  default:
+    return EINVAL;
+  }
 }
 strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy)