Re: [RFC] sched: implement the exclusive wait queue as a LIFO queue

From: David Howells
Date: Wed Apr 28 2010 - 09:22:14 EST


Changli Gao <xiaosuo@xxxxxxxxx> wrote:

> You are right. I made the wrong assumption. But we indeed need some
> primitive to add wait_queue at the head of the wait_queue_head, and I
> know epoll needs it, at least.
>
> fs/eventpoll.c: 1443.
> wait.flags |= WQ_FLAG_EXCLUSIVE;
> __add_wait_queue(&ep->wq, &wait);

You can add at either end of the wait queue with __add_wait_queue() and
__add_wait_queue_tail().

David
--
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/