01 Nov, 2011

1 commit


18 Apr, 2011

1 commit

  • A dynamic posix clock is protected from asynchronous removal by a mutex.
    However, using a mutex has the unwanted effect that a long running clock
    operation in one process will unnecessarily block other processes.

    For example, one process might call read() to get an external time stamp
    coming in at one pulse per second. A second process calling clock_gettime
    would have to wait for almost a whole second.

    This patch fixes the issue by using a reader/writer semaphore instead of
    a mutex.

    Signed-off-by: Richard Cochran
    Cc: John Stultz
    Link: http://lkml.kernel.org/r/%3C20110330132421.GA31771%40riccoc20.at.omicron.at%3E
    Signed-off-by: Thomas Gleixner

    Richard Cochran
     

13 Mar, 2011

1 commit

  • 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: Torben Hohn
    LKML-Reference:
    Cc: Richard Cochran
    Cc: John Stultz
    Cc: Thomas Gleixner

    Torben Hohn
     

02 Feb, 2011

1 commit

  • This patch adds support for adding and removing posix clocks. The
    clock lifetime cycle is patterned after usb devices. Each clock is
    represented by a standard character device. In addition, the driver
    may optionally implement custom character device operations.

    The posix clock and timer system calls listed below now work with
    dynamic posix clocks, as well as the traditional static clocks.
    The following system calls are affected:

    - clock_adjtime (brand new syscall)
    - clock_gettime
    - clock_getres
    - clock_settime
    - timer_create
    - timer_delete
    - timer_gettime
    - timer_settime

    [ tglx: Adapted to the posix-timer cleanup. Moved clock_posix_dynamic
    to posix-clock.c and made all referenced functions static ]

    Signed-off-by: Richard Cochran
    Acked-by: John Stultz
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Richard Cochran