Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117599
b: refs/heads/master
c: 7636947
h: refs/heads/master
i:
  117597: 98f8c3b
  117595: b7d11f0
  117591: 91e3efb
  117583: 89fe106
  117567: 309c637
v: v3
  • Loading branch information
Arjan van de Ven committed Sep 6, 2008
1 parent ed1ecdb commit c8344f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: beb20d52d03a51218827fb4a36a4b583debb03f9
refs/heads/master: 76369470b7e5f97fc1a8af83c45b9ff739b08cb6
8 changes: 3 additions & 5 deletions trunk/fs/timerfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr)

static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx)
{
ktime_t now, remaining;

now = ctx->tmr.base->get_time();
remaining = ktime_sub(ctx->tmr.expires, now);
ktime_t remaining;

remaining = hrtimer_expires_remaining(&ctx->tmr);
return remaining.tv64 < 0 ? ktime_set(0, 0): remaining;
}

Expand All @@ -74,7 +72,7 @@ static void timerfd_setup(struct timerfd_ctx *ctx, int flags,
ctx->ticks = 0;
ctx->tintv = timespec_to_ktime(ktmr->it_interval);
hrtimer_init(&ctx->tmr, ctx->clockid, htmode);
ctx->tmr.expires = texp;
hrtimer_set_expires(&ctx->tmr, texp);
ctx->tmr.function = timerfd_tmrproc;
if (texp.tv64 != 0)
hrtimer_start(&ctx->tmr, texp, htmode);
Expand Down

0 comments on commit c8344f0

Please sign in to comment.