Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 1999 17:10:03 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        Peter Dufault <dufault@hda.com>
Cc:        jeremyp@gsmx07.alcatel.com.au, jlemon@americantv.com, current@FreeBSD.ORG
Subject:   Re: HEADS UP
Message-ID:  <Pine.BSF.3.95.990830170732.339P-100000@current1.whistle.com>
In-Reply-To: <199908302359.TAA15498@hda.hda.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Mon, 30 Aug 1999, Peter Dufault wrote:

> > there are very few values that could make sense in both Hours scale and
> > usecs scale..
> > 
> > thus items that could be small could be in uSecs and items that could
> > be big could be in Secs.. A small set of functions could be used to 
> >  make this uniform through the system
> > 
> > syscall_Secs_to_hz(ulong *ticks, boolean Allow_zero SYSCTL_HANDLER_ARGS)
> > syscall_mSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS)
> > syscall_uSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS)
> 
> How about struct timeval instead?
Firstly we are talking about time deltas, and on the sysctl side of things
it's very hard to set 'timevals (as you'd need to set two different
variables) so you need a single value on teh userland side of things.
Inside the kernel it's all done in ticks, so you should store that.
thus having chosen the two units for internal and external, the function
almost defines itself.

julian


> 
> Peter
> 
> -- 
> Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
> HD Associates, Inc.               Safety critical systems, Agency approval
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990830170732.339P-100000>