[$] wait_var_event()
One of the trickiest aspects to concurrency in the kernel is waiting for aspecific event to take place. There is a wide variety of possible events,including a process exiting, the last reference to a data structure goingaway, a device completing an operation, or a timeout occurring.Waiting is surprisingly hard to get right - race conditions abound to trapthe unwary - so the kernel hasaccumulated a large set of wait_event_*() macros to make the task easier. Anattempt to add a new one, though, has led to the generalization of specifictypes of waits for 4.17.