Re: [patch 3/3] timerfd: Implement write method

From: Thomas Gleixner
Date: Wed May 21 2014 - 17:58:20 EST


On Thu, 22 May 2014, Thomas Gleixner wrote:

> On Tue, 29 Apr 2014, Cyrill Gorcunov wrote:
> > +
> > +static ssize_t timerfd_write(struct file *file, const char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + struct timerfd_ctx *ctx = file->private_data;
> > + u64 ticks = 0;
> > +
> > + if (count < sizeof(ticks))
> > + return -EINVAL;
> > +
> > + if (get_user(ticks, (u64 __user *) buf))
> > + return -EFAULT;
> > +
> > + spin_lock_irq(&ctx->wqh.lock);
> > + ctx->ticks = ticks;
>
> So what wakes a potential waiter in read/poll?

And who is updating timerfd_create(2) ?

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/