git: kernel/clock_gettime: Various fixes.

Sascha Wildner swildner at crater.dragonflybsd.org
Sun Sep 25 15:36:12 PDT 2016


commit c1b9c0932e482bb6a37eb190a5b504b270d2166d
Author: Sascha Wildner <saw at online.de>
Date:   Mon Sep 26 00:36:03 2016 +0200

    kernel/clock_gettime: Various fixes.
    
    * Fix CLOCK_PROF and CLOCK_VIRTUAL to behave like FreeBSD's. They are
      not meant to return the values of ITIMER_PROF and ITIMER_VIRTUAL
      (which are decreasing, see getitimer(2)), like they were implemented
      by 91810a6f0686477493e9915e98cfc5adcbe91363. This also fixes
      CLOCK_PROCESS_CPUTIME_ID.
    
    * Fix CLOCK_PROCESS_THREAD_ID. It was adding the values wrongly in a
      way that could cause tv_nsec to overflow (i.e. become >= 1000000000).
    
    * Fix clock_getres() for CLOCK_{PROCESS,THREAD}_CPUTIME_ID.
    
    * Mention CLOCK_{PROCESS,THREAD}_CPUTIME_ID in clock_gettime()'s manual
      page.
    
    * Bring in some minor manual page fixes from FreeBSD.
    
    Reported-by:   zhtw
    Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2951>

Summary of changes:
 lib/libc/sys/clock_gettime.2 | 40 +++++++++++++----------
 sys/kern/kern_time.c         | 75 +++++++++++++++++++++++---------------------
 2 files changed, 63 insertions(+), 52 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c1b9c0932e482bb6a37eb190a5b504b270d2166d


-- 
DragonFly BSD source repository


More information about the Commits mailing list