Gsoc 2014 project proposal

Joseph S. Myers joseph@codesourcery.com
Wed Feb 26 23:04:00 GMT 2014


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



More information about the Libc-alpha mailing list