svn commit: r363125 - head/sys/compat/linux

Alexander Leidinger Alexander at leidinger.net
Sun Jul 12 16:17:44 UTC 2020


Quoting Dimitry Andric <dim at freebsd.org> (from Sun, 12 Jul 2020  
15:36:25 +0200):

> On 12 Jul 2020, at 11:51, Alexander Leidinger <netchild at freebsd.org> wrote:
>>
>> Author: netchild
>> Date: Sun Jul 12 09:51:09 2020
>> New Revision: 363125
>> URL: https://svnweb.freebsd.org/changeset/base/363125
>>
>> Log:
>>  Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28).
>>
>>  It is documented as a raw hardware-based clock not subject to NTP or
>>  incremental adjustments. With this "not as precise as CLOCK_MONOTONIC"
>>  description in mind, map it to our CLOCK_MONOTNIC_FAST (the same
>>  mapping as for the linux CLOCK_MONOTONIC_COARSE).
>
> Okay, but:
>
>> @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l)
>> 		*n = CLOCK_THREAD_CPUTIME_ID;
>> 		break;
>> 	case LINUX_CLOCK_REALTIME_COARSE:
>> +	case LINUX_CLOCK_MONOTONIC_RAW:
>> 		*n = CLOCK_REALTIME_FAST;
>> 		break;
>> 	case LINUX_CLOCK_MONOTONIC_COARSE:
>
> this shows it is actually mapped to CLOCK_REALTIME_FAST, not
> CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :)

The commit message and the code I have running are right, the code I  
committed from a "no other change than that"-svn-tree was not. :(
I think I should switch to "diff | patch" even for one-liners like that.

I commited the fix based upon another message I've seen before this  
one, but thanks for looking at the code.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander at Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild at FreeBSD.org  : PGP 0x8F31830F9F2772BF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20200712/c7ed0308/attachment.sig>


More information about the svn-src-head mailing list