This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
pthread locking code - C vs. ASM
- From: Clemens Kolbitsch <clemens dot kol at gmx dot at>
- To: libc-alpha at sourceware dot org
- Date: Sat, 19 Jan 2008 14:38:10 +0100
- Subject: pthread locking code - C vs. ASM
Hi!
Why are some (e.g. locking) functions implemented twice -- once in C and once
in assembler? Is the C code used to get an asselber starting point which is
then optimized and saved into a second file?
For example pthread_rwlock_unlock is implemented in
source/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
and
source/nptl/pthread_rwlock_unlock.c
If I modify the asm code only, is there a chance that some script (e.g. during
make clean && make) will overwrite my changes or is the ASM code the correct
place to edit things (otherwise I don't see my modifications being linked
into the binary...)?
Thanks!