This is the mail archive of the
mailing list for the glibc project.
Re: pthread_cond_* does not compile on i386
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Gilles Carry" <Gilles dot Carry at bull dot net>
- Cc: libc-help at sourceware dot org
- Date: Mon, 5 May 2008 08:40:21 -0400
- Subject: Re: pthread_cond_* does not compile on i386
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=AOk4UTubLIEduF7u0F0hYNoXaDq7V0TOCEE+BEIl23Q=; b=irYNuqhQzQAgPxueY1BELafNPIQw2dlwap7t8DtvLk0PLT+t8Zzqefl4N/U/hp6jxMSUuk8d/JsjD4yjFsnNmLIhtyTyUE1ODPBVpjQN8IfeSM3FozDUdtUeyIKuQ/i4R9d7GDlNEkJqa2DyErgWx6MTm0zh3f8cdZ48mdBJWaE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=M8ccq0UOWTJSlYnpGbKKh68zEpbuqaZ3xZfKJpS4VyOyS3XKZCTMZWKehSUeVDnJF5+gRquYlIqQwGSr+DWSyOrF14L14QtfV4anlvyof5Qd+c7z7XI0mZ7pLdvnx4bO6MCkpyQgQuC+6EFKU/Mt9UEfCmjXomoczJqyCmxfunU=
- References: <48185CA9.firstname.lastname@example.org> <email@example.com> <481EAF50.firstname.lastname@example.org>
On Mon, May 5, 2008 at 2:55 AM, Gilles Carry <Gilles.Carry@bull.net> 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
> > They don't need to be kept "in sync", the i386 port probably doesn't
> > rely on the C code variants of these functions.
> I thought asm files were supposed to be only optimizations of existing C
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.