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

On Mon, May 5, 2008 at 2:55 AM, Gilles Carry <> wrote:
> > Why would you remove the asm files that implement the required behaviour?
>  Just because I wanted to add new features into condvars.

That's a good reason, but you will have to implement all the missing
functionality. I would suggest looking at libc-ports for inspiration.
In particular hppa (I maintain it) uses almost no asm to implement
NPTL support.

> > They don't need to be kept "in sync", the i386 port probably doesn't
> > rely on the C code variants of these functions.
>  Strange.
>  I thought asm files were supposed to be only optimizations of existing C
> code.

This is not true. Did you read this somewhere?

The asm files can be a complete implementation.

For example the *context() routines are very difficult to write in C,
possible with the use of some GCC extensions, but they are almost
always written completely in assembly.

>  It makes sense to me to modify generic c code first and optimize afterward.
>  ie. pthread_cond_wait.c is not trivial enough to skip the generic C-coding
> phase and go directly to asm code.

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.

Are you working on NPTL instrumentation? I saw the Bull presentation
at OLS several years ago and I was *very* impressed. I would like
nothing more than to see that code go into libc proper.


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