This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
pthread_spin_lock, "memory" clobber missing ?
- From: "Riesch Nicolas" <Nicolas dot Riesch at genevoise dot ch>
- To: <libc-alpha at sources dot redhat dot com>
- Date: Wed, 16 Nov 2005 11:50:52 +0100
- Subject: pthread_spin_lock, "memory" clobber missing ?
The code for locking spinlocks in Linux kernel contains a "memory"
clobber.
( see function "_raw_spin_lock(spinlock_t *lock)" at
http://lxr.linux.no/source/include/asm-i386/spinlock.h#L141 )
The code for function "pthread_spin_lock" in file
"nptl/sysdeps/i386/pthread_spin_lock.c" does not contain the "memory"
clobber.
Without "memory" clobber, I suppose the compiler may not flush registers
to memory before entering the spinlock code.
So, shouldn't it be added ?
**********************************************************************
This message is being transmitted to you without prior inspection
by Geneva Insurance.
The message engages only the person who authored it and in
no way is binding on Geneva Insurance.
The latter can under no circumstances be held responsible
for the contents of this message, neither contractually nor in
any other manner.
If the case arises, any commitments made by the author of
this message in the name of Geneva Insurance have no legal
validity unless confirmed in a letter duly signed by persons
authorized to represent the company.
www.genevoise.ch
**********************************************************************