2000-09-26  Ulrich Drepper  <drepper@redhat.com>

	* spinlock.h (__pthread_set_own_extricate_if): Add back locking
	and explain why.
This commit is contained in:
Ulrich Drepper 2000-09-26 21:01:24 +00:00
parent 09bf6406b1
commit 7c3dac5302
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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
}