wait_event()\ wait_event_interruptible()\ wait_event_interruptible_timeout() and wake_up()

Muni Sekhar munisekharrms at gmail.com
Tue Aug 6 08:00:43 EDT 2019


On Tue, Aug 6, 2019 at 5:12 PM Valdis Klētnieks <valdis.kletnieks at vt.edu> wrote:
>
> On Tue, 06 Aug 2019 14:15:53 +0530, Muni Sekhar said:
>
> > If they do different things, does the waiting threads wakeup order is
> > the same in which they were enqueued (FIFO order)?
>
> You missed the point - if you have (for example) something that's waiting for
> mouse I/O and something that's waiting for a network packet, under what
> conditions will they be using the same wait event?
In this example they won't wait on the same wait event. Let us
consider buggy code is written like that and more than one
process(they do different things) waiting on the same wait event which
process gets woken up? Is the process at the head of the list?



-- 
Thanks,
Sekhar



More information about the Kernelnewbies mailing list