On Sat, 7 Jul 2001, David O'Brien wrote:
> On Sat, Jul 07, 2001 at 01:02:28PM -0700, Matthew Jacob wrote:
> >
> >
> > On Sat, 7 Jul 2001, David O'Brien wrote:
> >
> > > On Sat, Jul 07, 2001 at 11:54:26AM -0700, Matthew Jacob wrote:
> > > >
> > > >
> > > > On Sat, 7 Jul 2001, David O'Brien wrote:
> > > >
> > > > > On Fri, Jul 06, 2001 at 03:08:04PM +1000, Peter Jeremy wrote:
> > > > > > i386 type Alpha type
> > > > > > clock_t unsigned long int
> > > > >
> > > > > We could make these the same (not sure why they aren't).
No good reason. I think "unsigned long" is used on i386's because that
was the largest type. This was apparently considered to be too large
on alphas, so it was changed to a 32 bit type. Changing it from a signed
type to an unsigned type was just a pessimization of its range. With the
alpha pessimizations of the scale factors (_BSD_CLOCKS_PER_SEC_ = 100
and _BSD_CLK_TCK_ = 100), the range of a 31-effective-bits clock_t is
24.855 days. A 32-bit unsigned clock_t would have a range of 49.710
days. POSIX.1 only requires a range of 1 day.
> > > > because on alpha long == 64 bits
> > >
> > > What about the otherway around?? Like use "int" or "unsigned int" on
> > > both.
> >
> > Let's use 64 bits for both.
> >
> > You're retirement has been put off to 2043 at least...
clock_t has nothing to do with calendar times.
> I don't know what clock_t is used for (kernel version of time_t?).
> But the general agreement was to leave time as a 32-bit value on the
> Alpha in order to match (1) FreeBSD/i386 and (2) OSF/1,Digital Unix,Tru64.
It is used (entirely outside of the kernel) for the following interfaces:
clock_t clock(void); (ISO C)
clock_t times(struct tms *); (POSIX.1)
struct tms members:
clock_t tms_utime
clock_t tms_stime
clock_t tms_cutime
clock_t tms_cstime
See clocks.7 for more details about whey these interfaces are currently
not useful. (To be as useful as getrusage(), CLOCKS_PER_SEC must be at
least 10^6. This gives at least 86.4e9 "ticks" per day, so clock_t must
have at least 37 bits.)
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message