pthread locking code - C vs. ASM
Clemens Kolbitsch
clemens.kol@gmx.at
Sat Jan 19 13:38:00 GMT 2008
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!
More information about the Libc-alpha
mailing list