This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]