Wait queues are implemented as cyclical lists whose elements include pointers to process
descriptors. Each element of a wait queue list is of type wait_queue:
struct wait_queue {
struct task_struct * task;
struct wait_queue * next;
};
Each wait queue is identified by a wait queue pointer, which contains either the address of the first element of the list or the null pointer if the list is empty. The next field of the
wait_queue data structure points to the next element in the list, except for the last element,
whose next field points to a dummy list element.