aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-26 21:01:24 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-26 21:01:24 +0000
commit7c3dac53024e7f9122b8b406cfc2622e68149a49 (patch)
treeb1f239862ad3827b01e1b837a7128059a7a3abe9 /linuxthreads
parent09bf6406b102b89e52f734b517030b86b7583aaf (diff)
downloadglibc-7c3dac53024e7f9122b8b406cfc2622e68149a49.tar
glibc-7c3dac53024e7f9122b8b406cfc2622e68149a49.tar.gz
glibc-7c3dac53024e7f9122b8b406cfc2622e68149a49.tar.bz2
glibc-7c3dac53024e7f9122b8b406cfc2622e68149a49.zip
Update.
2000-09-26 Ulrich Drepper <drepper@redhat.com> * spinlock.h (__pthread_set_own_extricate_if): Add back locking and explain why.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/spinlock.h8
2 files changed, 7 insertions, 6 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 1bf05a21b9..0fb15c5134 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-26 Ulrich Drepper <drepper@redhat.com>
+
+ * spinlock.h (__pthread_set_own_extricate_if): Add back locking
+ and explain why.
+
2000-09-20 Andreas Jaeger <aj@suse.de>
* pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index b3d02314bf..c194d79bd6 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -214,13 +214,9 @@ static inline long atomic_decrement(struct pthread_atomic *pa)
static inline void
__pthread_set_own_extricate_if(pthread_descr self, pthread_extricate_if *peif)
{
-#if 0
+ /* The locks here are not ensuring an atomic update of the p_extricate
+ pointer. They protect users of the pointer from using stale memory. */
__pthread_lock(THREAD_GETMEM(self, p_lock), self);
THREAD_SETMEM(self, p_extricate, peif);
__pthread_unlock(THREAD_GETMEM (self, p_lock));
-#else
- /* I don't think that getting the lock is necessary. All we do is an
- atomic write. */
- THREAD_SETMEM(self, p_extricate, peif);
-#endif
}