Re: [take3 4/4] kevent: poll/select() notifications. Timer notifications.

Eric Dumazet
2006-08-03T09:43:12Z

On Thursday 03 August 2006 11:46, Evgeniy Polyakov wrote:
> poll/select() notifications. Timer notifications.
>
> +++ b/kernel/kevent/kevent_poll.c

> +static int kevent_poll_wait_callback(wait_queue_t *wait,
> + unsigned mode, int sync, void *key)
> +{
> + struct kevent_poll_wait_container *cont =
> + container_of(wait, struct kevent_poll_wait_container, wait);
> + struct kevent *k = cont->k;
> + struct file *file = k->st->origin;
> + unsigned long flags;
> + u32 revents, event;
> +
> + revents = file->f_op->poll(file, NULL);
> + spin_lock_irqsave(&k->ulock, flags);
> + event = k->event.event;
> + spin_unlock_irqrestore(&k->ulock, flags);

Not sure why you take a spinlock just to read a u32

Eric