This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ppc64 changes common powerpc/bits headers


Ulrich Drepper writes

> Steve Munroe wrote:
> > diff -rupPN
libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
>libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
> > --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
       Thu Jul  5 23:56:19 2001
> > +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
 Fri Sep 27 10:44:30 2002
> > @@ -1,4 +1,4 @@
> > -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
> > +/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software
Foundation, Inc.
> >     This file is part of the GNU C Library.
> >
> >     The GNU C Library is free software; you can redistribute it and/or
> > @@ -38,11 +38,17 @@ typedef unsigned long int msglen_t;
> >  struct msqid_ds
> >  {
> >    struct ipc_perm msg_perm;    /* structure describing operation
permission */
> > +#if __WORDSIZE == 32
> >    unsigned int __unused1;
> > +#endif
> >    __time_t msg_stime;          /* time of last msgsnd command */
> > +#if __WORDSIZE == 32
> >    unsigned int __unused2;
> > +#endif
> >    __time_t msg_rtime;          /* time of last msgrcv command */
> > +#if __WORDSIZE == 32
> >    unsigned int __unused3;
> > +#endif

> That's stupid.  The unused field is meant to be used for sub-second
> information.  There is (fortunately) again discussion about adding
> support to the kernel.  You'd shut out ppc64 of this, doomed to live
> with full second numbers.

I assumed that this was to prepare for migration to 64-bit time_t.  This
worked out nicely aligning ppc32's 32-bit time_t to low order bits of
ppc64's 64-bit time. We followed the exmples in x86_64/bits and s390/bits.
Also looking at ia64/bits/msq.h there is no pad at all.

To me it seems odd to add the subsecond pad in front of the time_t (not use
to thinking little endian  :).

So what is the intended design:
1) a single 64-bit integer containing seconds and 32-bit fraction?
2) A struct like timeval?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]