[PATCH 02/04] add SPU gettimeofday

Patrick Mansfield patmans@us.ibm.com
Thu Feb 15 20:22:00 GMT 2007


On Thu, Feb 15, 2007 at 11:23:47AM +0900, Kazunori Asayama wrote:
> Patrick Mansfield <patmans@us.ibm.com> wrote:
> > Index: time-fix-spu/libgloss/spu/jsre.h
> > ===================================================================
> > --- time-fix-spu.orig/libgloss/spu/jsre.h
> > +++ time-fix-spu/libgloss/spu/jsre.h
> (snip)
> >  typedef struct
> >  {
> > +	unsigned int	tv;
> > +	unsigned int	tz;
> > +	unsigned int	pad0[ 3 ];
> > +} syscall_gettimeofday_t;
> 
> Is it correct ?

No :-/ I missed that, thanks.

> I supporse that it should be:
> 
> --
> typedef struct
> {
> 	unsigned int	tv;
> 	unsigned int	pad0[ 3 ];
> 	unsigned int	tz;
> } syscall_gettimeofday_t;

It should have two pads like the others, I assume the second pad - or
final pad on some of the others - is for 128-bit DMA alignment, though we
send uninitialized data in the pad part anyway. I will send an update. I
obviously did not test the tz part :-/ (well "man gettimeofday" says use
of tz is obsolete and buggy).

-- Patrick Mansfield



More information about the Newlib mailing list