• Andrew Morton's avatar
    [PATCH] Some clean up of the time code. · b9cebc5d
    Andrew Morton authored
    From: george anzinger <george@mvista.com>
    
    This patch does the following:
    
    Pushs down the change from timeval to timespec in the settime routines.
    
    Fixes two places where time was set without updating the monotonic clock
    offset.  (Changes sys_stime() to call do_settimeofday() and changes
    clock_warp to do the update directly.) These were bugs!
    
    Changes the uptime code to use the posix_clock_monotonic notion of uptime
    instead of the jiffies.  This time will track NTP changes and so should be
    better than your standard wristwatch (if your using ntp).
    
    Changes posix_clock_monotonic to start at 0 on boot (was set to start at
    initial jiffies).
    
    Fixes a bug (never experienced) in timer_create() in posix-timers.c where
    we "could" have released timer_id 0 if "id resources" were low.
    
    Adds a test in do_settimeofday() to error out (EINVAL) attempts to use
    unnormalized times.  This is passed back up to both settimeofday and
    posix_setclock().
    
    Warning: Requires changes in .../arch/???/kernel/time.c to change
    do_settimeofday() to return an error if time is not normalized and to use a
    timespec instead of timeval for its input.
    b9cebc5d
proc_misc.c 17.7 KB