This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [parisc-linux] Re: NPTL for hppa-linux is not backwards compatible with Linuxthreads.
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Roland McGrath" <roland at redhat dot com>
- Cc: libc-ports at sourceware dot org, debian-glibc at lists dot debian dot org, parisc-linux <parisc-linux at lists dot parisc-linux dot org>
- Date: Sun, 25 Feb 2007 21:47:38 -0500
- Subject: Re: [parisc-linux] Re: NPTL for hppa-linux is not backwards compatible with Linuxthreads.
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; 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; b=bwqNglLT4gnqpDyUZdOXLdL93r33qByq7Ytwjp1un74oEfuAhhwgcZbkJlZYC95chKfqKsEynkMR+s6vDyAk27yQ0Yg31j+IRIMqmrDC7dVilnZHlHD3XQxKC8ZrPun+vnCPqAZEitALp6LCrJZ1vc0bMcTeUBoOTyRa6VUu9Pk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=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; b=Z3Y6T0HmTSZ83pUsdORZPN9lh+XRxhq0acSaaBKT/1DohywkNvn2A4CKlubhbieq+lCK81X6qrVU8zbtxN8QvC6EtLX5KKkwxXm2smcvOD39bNlIu43Dj0NW4vNDU6Evii4sDxtAYcMZ1KK73M4AxH/LWS8n2FlVO/sY+1w7BrE=
- References: <119aab440702230839r74de6682ge0619c42d5606caf@mail.gmail.com> <20070224015607.EC0DC180076@magilla.sf.frob.com>
On 2/23/07, Roland McGrath <roland@redhat.com> wrote:
> Unfortunatly, due to alignment the NPTL pthread_cond_t grows larger
> than the Linuxthreads version when I add the padding. This is the only
> structure the grows larger in size than before. Is there any way I can
> avoid adding the padding?
It looks to me like you have one word to spare. That's all you really
need. That word will only ever be 1 from old PTHREAD_COND_INITIALIZER.
Checking all three padding words is really just paranoia trying to
distinguish clobbered structs from old initialized data.
I did a couple of tests and I verified that I have no words to spare.
Adding an extra "int __pad" forces the structure to grow by 8 bytes
due to the "long long" alignment requirements.
Would I be allowed to allocated a temporary pthread_cond_t in the
wrapper, store the address in one of the 3 unused lock words, and have
all the wrapper functions use that after allocation?
Cheers,
Carlos.