Subject: Re: CVS commit: src
To: None <tech-kern@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: tech-kern
Date: 05/21/2007 19:42:42
On Tue, May 15, 2007 at 09:58:30 +0900, YAMAMOTO Takashi wrote:

> > yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
> > > - i think members of struct aiocb should be ordered in an alignment
> > >   friendly manner.
> > > 
> > > - why _state is of char, rather than, say, int?
> > 
> > Mhm, not sure how friendly would that. Check the attached diff.
> 
> 	off_t
> 	void *
> 	size_t
> 	int
> 	int
> 	int
> 	int _pad;
> 	struct sigevent
> 	:
> 
> (sizes of void * and size_t depend on ports.)


Why "int _pad" is necessary here?  Compiler should insert proper
padding before struct sigevent anyway:

    6.7.2.1
       [#12] Each non-bit-field member  of  a  structure  or  union
       object   is  aligned  in  an  implementation-defined  manner
       appropriate to its type.


SY, Uwe
-- 
uwe@stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen