Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234605
b: refs/heads/master
c: 27722df
h: refs/heads/master
i:
  234603: a5c8bf8
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 2, 2011
1 parent 87e8b0a commit d6baa60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 838394fbf989973ec7f5a0ad82cb6ff09e5c39aa
refs/heads/master: 27722df16ef143017db55ac7baac1703a68017ff
10 changes: 8 additions & 2 deletions trunk/kernel/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,15 @@ static __init int init_posix_timers(void)
.nsleep = common_nsleep,
.nsleep_restart = hrtimer_nanosleep_restart,
.timer_create = common_timer_create,
.timer_set = common_timer_set,
};
struct k_clock clock_monotonic = {
.clock_getres = hrtimer_get_res,
.clock_get = posix_ktime_get_ts,
.nsleep = common_nsleep,
.nsleep_restart = hrtimer_nanosleep_restart,
.timer_create = common_timer_create,
.timer_set = common_timer_set,
};
struct k_clock clock_monotonic_raw = {
.clock_getres = hrtimer_get_res,
Expand Down Expand Up @@ -814,6 +816,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
int error = 0;
unsigned long flag;
struct itimerspec *rtn = old_setting ? &old_spec : NULL;
struct k_clock *kc;

if (!new_setting)
return -EINVAL;
Expand All @@ -829,8 +832,11 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
if (!timr)
return -EINVAL;

error = CLOCK_DISPATCH(timr->it_clock, timer_set,
(timr, flags, &new_spec, rtn));
kc = clockid_to_kclock(timr->it_clock);
if (WARN_ON_ONCE(!kc || !kc->timer_set))
error = -EINVAL;
else
error = kc->timer_set(timr, flags, &new_spec, rtn);

unlock_timer(timr, flag);
if (error == TIMER_RETRY) {
Expand Down

0 comments on commit d6baa60

Please sign in to comment.