Re: [PATCH] adjtimex.2: Add details about ADJ_FREQUENCY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again,

Le 30/12/2014 19:05, Richard Cochran a écrit :
>> diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
>> index 18823c8..2652fc6 100644
>> --- a/man2/adjtimex.2
>> +++ b/man2/adjtimex.2
>> @@ -55,8 +55,8 @@ struct timex {
>>                           status flag is set, otherwise
>>                           microseconds */
>>      long freq;        /* Frequency offset, as scaled PPM
>> -                         (parts per million) */
>> -.\" FIXME What is the scaling unit of timex.freq?  2^16 ?
> 
> Your text sounds funny and seems unclear to me.  How about something
> more like this:
> 
> 	long freq	/* Frequency offset in PPM with a 16 bit
> 			   factional field */
>

I tried to  phrase it as in the FIXME, but of course, that may not be
the best thing to do. I'm not sure to understand what you mean however
in your corrected comment for freq.

>> +                         (parts per million) :
>> +                         the scaling unit of timex.freq is 2^16 usec =
>> 1000*2^16 nsec.
> 

> Your mailer is wrapping lines here ...

Indeed, it wrapped at 80 characters. I fixed it. Sorry about that.

> 
>>      long maxerror;    /* Maximum error (microseconds) */
>>      long esterror;    /* Estimated error (microseconds) */
>>      int  status;      /* Clock command/status */
>> @@ -106,6 +106,10 @@ Set time offset from
>>  .BR ADJ_FREQUENCY
>>  Set frequency offset from
>>  .IR buf.freq .
>> +The clock frequency must be comprised between -500000 and 500000 scaled
>> ns/s.
> 
> and here.
> 
> The phrase "must be comprised" does not make any sense in this
> context. How about this instead?
> 
>    The allowed frequency range is -500 PPM to +500 PPM.
> 

Sorry for my poor english.
I have a doubt about the calculations here.
If I understand the code correctly (and I'd like to, as I'm using it)
the input value is scaled with SHIFT_USEC whereas MAXFREQ is not. So,
PPM is not exactly the same unit here and above (in struct timex). How
should we phrase that?

Thanks

Laurent

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux