1. 12 Mar, 2011 1 commit
    • Torben Hohn's avatar
      posix-clocks: Check write permissions in posix syscalls · 6e6823d1
      Torben Hohn authored
      pc_clock_settime() and pc_clock_adjtime() do not check whether the fd
      was opened in write mode, so a clock can be set with a read only fd.
      
      [ tglx: We deliberately do not return -EPERM as we want this to be
        	distingushable from the capability based permission check ]
      Signed-off-by: default avatarTorben Hohn <torbenh@gmx.de>
      LKML-Reference: <1299173174-348-4-git-send-email-torbenh@gmx.de>
      Cc: Richard Cochran <richard.cochran@omicron.at>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      6e6823d1
  2. 10 Mar, 2011 2 commits
  3. 02 Mar, 2011 1 commit
  4. 21 Feb, 2011 5 commits
    • John Stultz's avatar
      timers: Export CLOCK_BOOTTIME via the posix timers interface · 7fdd7f89
      John Stultz authored
      This patch exports CLOCK_BOOTTIME through the posix timers interface
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      7fdd7f89
    • John Stultz's avatar
      timers: Add CLOCK_BOOTTIME hrtimer base · 70a08cca
      John Stultz authored
      CLOCK_MONOTONIC stops while the system is in suspend. This is because
      to applications system suspend is invisible. However, there is a
      growing set of applications that are wanting to be suspend-aware,
      but do not want to deal with the complications of CLOCK_REALTIME
      (which might jump around if settimeofday is called).
      
      For these applications, I propose a new clockid: CLOCK_BOOTTIME.
      CLOCK_BOOTTIME is idential to CLOCK_MONOTONIC, except it also
      includes any time spent in suspend.
      
      This patch add hrtimer base for CLOCK_BOOTTIME, using
      get_monotonic_boottime/ktime_get_boottime, to allow
      in kernel users to set timers against.
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      70a08cca
    • John Stultz's avatar
      time: Extend get_xtime_and_monotonic_offset() to also return sleep · 314ac371
      John Stultz authored
      Extend get_xtime_and_monotonic_offset to
      get_xtime_and_monotonic_and_sleep_offset().
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      314ac371
    • John Stultz's avatar
      time: Introduce get_monotonic_boottime and ktime_get_boottime · abb3a4ea
      John Stultz authored
      This adds new functions that return the monotonic time since boot
      (in other words, CLOCK_MONOTONIC + suspend time).
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      abb3a4ea
    • John Stultz's avatar
      hrtimers: extend hrtimer base code to handle more then 2 clockids · e06383db
      John Stultz authored
      The hrtimer code is written mainly with CLOCK_REALTIME and CLOCK_MONOTONIC
      in mind. These are clockids 0 and 1 resepctively. However, if we are
      to introduce any new hrtimer bases, using new clockids, we have to skip
      the cputimers (clockids 2,3) as well as other clockids that may not impelement
      timers.
      
      This patch adds a little bit of indirection between the clockid and
      the base, so that we can extend the base by one when we add
      a new clockid at number 7 or so.
      
      CC: Jamie Lokier <jamie@shareable.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alexander Shishkin <virtuoso@slind.org>
      CC: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      e06383db
  5. 18 Feb, 2011 1 commit
  6. 09 Feb, 2011 1 commit
  7. 02 Feb, 2011 29 commits