This is the mail archive of the
mailing list for the glibc project.
- To: glibc-cvs at sourceware dot cygnus dot com
- Subject: libc/linuxthreads spinlock.c
- From: drepper at sourceware dot cygnus dot com
- Date: 24 May 2001 07:24:43 -0000
Module name: libc
Changes by: email@example.com 2001-05-24 00:24:43
linuxthreads : spinlock.c
(__pthread_release): New inline function for releasing
spinlock, to complement __pthread_acquire. Includes memory
barrier prior to assignment to spinlock, and __asm __volatile
dance to prevent reordering or optimization of the spinlock access.
(__pthread_unlock, __pthread_alt_lock, __pthread_alt_timedlock,
__pthread_alt_unlock, __pthread_compare_and_swap): Updated to use new
__pthread_release instead of updating spinlock directly.
(__pthread_lock, __pthread_unlock, wait_node_alloc, wait_node_free,
wait_node_dequeue, __pthread_alt_lock, __pthread_alt_timedlock,
__pthread_alt_unlock, __pthread_acquire): Memory barrier overhaul. Lots of
missing memory barriers added, a couple needless ones removed.
(__pthread_compare_and_swap): testandset optimization removed, just calls
__pthread_acquire, which has the new read barrier in it before its testandset.