In use case, we can see
void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
We add wait_queue_t to a wait_queue_head_t.
I don't understand, the wait_queue_t is already contained a list_head:
struct list_head task_list;
that means we don't need wait_queue_head_t and still can make a link list of wait_queue_t.
In this case, why we need wait_queue_head_t? what's the usage here?
By the way, it is in my mind, a similar issue:why sibling list is used to get the task_struct while fetching the children of a process
Why store sibling list in list_head of children? isn't sibling itself already a list?