Skip to content

Commit 7dda712

Browse files
author
Christoph Hellwig
committed
timerfd: add support for keyed wakeups
This prepares timerfd for use with aio poll. Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Avi Kivity <[email protected]>
1 parent 1ffaddd commit 7dda712

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/timerfd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void timerfd_triggered(struct timerfd_ctx *ctx)
6666
spin_lock_irqsave(&ctx->wqh.lock, flags);
6767
ctx->expired = 1;
6868
ctx->ticks++;
69-
wake_up_locked(&ctx->wqh);
69+
wake_up_locked_poll(&ctx->wqh, EPOLLIN);
7070
spin_unlock_irqrestore(&ctx->wqh.lock, flags);
7171
}
7272

@@ -107,7 +107,7 @@ void timerfd_clock_was_set(void)
107107
if (ctx->moffs != moffs) {
108108
ctx->moffs = KTIME_MAX;
109109
ctx->ticks++;
110-
wake_up_locked(&ctx->wqh);
110+
wake_up_locked_poll(&ctx->wqh, EPOLLIN);
111111
}
112112
spin_unlock_irqrestore(&ctx->wqh.lock, flags);
113113
}
@@ -345,7 +345,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
345345
spin_lock_irq(&ctx->wqh.lock);
346346
if (!timerfd_canceled(ctx)) {
347347
ctx->ticks = ticks;
348-
wake_up_locked(&ctx->wqh);
348+
wake_up_locked_poll(&ctx->wqh, EPOLLIN);
349349
} else
350350
ret = -ECANCELED;
351351
spin_unlock_irq(&ctx->wqh.lock);

0 commit comments

Comments
 (0)