This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Gsoc 2014 project proposal
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andrea Francesco Iuorio <andreafrancesco dot iuorio at gmail dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 26 Feb 2014 23:03:57 +0000
- Subject: Re: Gsoc 2014 project proposal
- Authentication-results: sourceware.org; auth=none
- References: <CAMaJsKjobBfmxjBRB2WP6MMLiAAD=QTV3bhO=hogeZHxmmotPg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1402261759390 dot 11728 at digraph dot polyomino dot org dot uk> <CAMaJsKg-4WTvX+XPYXMYXHZvRvUotyYeq7O69Xye4WBE7Zw6Wg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1402262139270 dot 17207 at digraph dot polyomino dot org dot uk> <CAMaJsKjKweKU+XRJWAcLOQDdPZpYL_Ms6izd+GB6PSBrz71qJg at mail dot gmail dot com>
On Wed, 26 Feb 2014, Andrea Francesco Iuorio wrote:
> I think i understand now. The important thing is that i must create
> the union/struct directly in the typedef and avoid renaming. If
> possible i should try to mantain the pthread types structure so i can
> cast between them. I don' t understand one thing in the first
> solution: why do you separate the architecture-dependent data ? Just
> to have the same machine-dependent code in only one place ?
In general, when you have lots of architecture-specific versions of a
header there's a risk that some patch won't update them all consistently.
Thus, if something is consistent between all architectures, it's best that
it's in an architecture-independent header - that the
architecture-dependent headers only contain the minimum that really does
vary between architectures.
See, for example, how we have bits/fcntl-linux.h with definitions shared
between Linux architectures, with bits/fcntl.h only containing the minimum
that depends on the architecture.
--
Joseph S. Myers
joseph@codesourcery.com