This is the mail archive of the 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]

Re: pthread_cond_* does not compile on i386

Carlos O'Donell wrote:

Should C code be the reference? Should asm be modified only when we are
sure C is ok? It is a problem when people change asm code without updating
the underlying C files.

you should modify whatever your target platform uses

That's a vague response. The C code tries to be the generic reference,
but can't always in the case where the feature can't be implemented
completely in C (or safely given an optimizing compiler). The generic
C code is going to be used by targets that don't override the C file
with an asm file, so yes, it should be modified first. I would then
build and test on a target that uses the generic C file. Next you
probably want to adjust the asm that implements the C file for your
target, and test again.

I don't know if there are specific rules for this but it would make sense to me that C code is the reference.

At one point the generic C code probably worked, but after the asm
files were written nobody bothered to build without them. As time
passed it bit rotted.

It's a pity.

The generic C code works, but it's the i386 target that is probably
missing some of the C file implementations of certain macros.

I think that people modifying the i386 did not bother updating the C files or vice-versa.
Actually, i386 lacks some macros used in C code:
pthread_cond_broadcast.c: lll_futex_requeue
pthread_cond_signal.c: lll_futex_wake_unlock


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