about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-08-10 17:50:00 +0000
committerAndreas Jaeger <aj@suse.de>2000-08-10 17:50:00 +0000
commite642a888521549ebe0d0aab87d8a5d92d80783b5 (patch)
treeb77bce54db36abf9fe5d40b50556f570d52b052d
parent555be45444c5fd082580a1cd7bd695905e627717 (diff)
downloadglibc-e642a888521549ebe0d0aab87d8a5d92d80783b5.tar.gz
glibc-e642a888521549ebe0d0aab87d8a5d92d80783b5.tar.xz
glibc-e642a888521549ebe0d0aab87d8a5d92d80783b5.zip
Move setting of mutex owner into critical section.
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/mutex.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 2f2ab954d0..0e8db45455 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-10  Andreas Jaeger  <aj@suse.de>
+
+	* mutex.c (__pthread_mutex_unlock): Move setting of mutex owner
+	into critical section.
+	Patch by Juergen Kreileder <jk@blackdown.de>.
+
 2000-07-31  Andreas Jaeger  <aj@suse.de>
 
 	* mutex.c (__pthread_mutex_trylock): Only set mutex owner if we
diff --git a/linuxthreads/mutex.c b/linuxthreads/mutex.c
index ed1e7607c1..29f234308a 100644
--- a/linuxthreads/mutex.c
+++ b/linuxthreads/mutex.c
@@ -109,8 +109,8 @@ int __pthread_mutex_unlock(pthread_mutex_t * mutex)
 {
   switch (mutex->__m_kind) {
   case PTHREAD_MUTEX_FAST_NP:
-    __pthread_unlock(&mutex->__m_lock);
     mutex->__m_owner = NULL;
+    __pthread_unlock(&mutex->__m_lock);
     return 0;
   case PTHREAD_MUTEX_RECURSIVE_NP:
     if (mutex->__m_count > 0) {