The purpose of calling init_waitqueue_head()

m silverstri michael.j.silverstri at gmail.com
Sat Feb 22 01:03:58 EST 2014


Hi,

I am trying to understanding a linux driver code here:

https://android.googlesource.com/kernel/exynos/+/a6a1de6334417e0800440cdf971270df6f90b2fa/drivers/media/video/exynos/jpeg/

In here

https://android.googlesource.com/kernel/exynos/+/a6a1de6334417e0800440cdf971270df6f90b2fa/drivers/media/video/exynos/jpeg/jpeg_dev.c,
it calls 'init_waitqueue_head() where wq  is a "wait_queue_head_t
  wq;"

      mutex_init(&ctrl->lock);
        init_waitqueue_head(&ctrl->wq);

But I search the whole directory for wq usage, I don't find anywhere wq is used.
Can you please tell me what is the purpose of calling "init_waitqueue_head"?

Thank you.



More information about the Kernelnewbies mailing list