This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
pthread_spin_unlock on IA64
- From: "Boehm, Hans" <hans dot boehm at hp dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: "Boehm, Hans" <hans dot boehm at hp dot com>
- Date: Tue, 18 Jul 2006 17:36:36 -0700
- Subject: pthread_spin_unlock on IA64
I've spent some time looking into the slightly esoteric question of what
fences actually need to be included in pthread locking operations. As
part of that I looked a bit at what nptl actually does.
I ran into one case in which the result seems clearly nonsensical,
independent of the more subtle issues. On IA64, at least as of
glibc-2.3.6 on my Debian machine, pthread_mutex_unlock() generates
basically
mf
st.rel4 ...
I cannot see any conceivable reason for the mf, other than to slow down
the code.
I'm also not entirely sure what source file this corresponds to. Is
./nptl/sysdeps/pthread/pthread_spin_unlock.c somehow being used instead
of ./nptl/sysdeps/ia64/pthread_spin_unlock.c? Then the result would
make sense.
(I did not verify this with 2.4. But the code does not appear to have
changed. I also first noticed some time ago, so it seems to be fairly
stable across glibc versions.)
[Please copy me in reply.]
Thanks.
Hans