mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
posix-timers: Add support for fd based clocks
Extend the negative clockids which are currently used by posix cpu timers to encode the PID with a file descriptor based type which encodes the fd in the upper bits. Originally-from: Richard Cochran <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: John Stultz <[email protected]> LKML-Reference: <[email protected]>
This commit is contained in:
parent
ce26efdefa
commit
81e294cba2
2 changed files with 14 additions and 1 deletions
|
|
@ -488,7 +488,7 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
|
|||
static struct k_clock *clockid_to_kclock(const clockid_t id)
|
||||
{
|
||||
if (id < 0)
|
||||
return &clock_posix_cpu;
|
||||
return (id & CLOCKFD_MASK) == CLOCKFD ? NULL : &clock_posix_cpu;
|
||||
|
||||
if (id >= MAX_CLOCKS || !posix_clocks[id].clock_getres)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue