linux.conf.au, January 2003 PRACTICALITIES: More Common Functions Step 3: To wait for it wait_event_interruptible(wq, condition). Sleeps on wq until "condition" is true. eg. /* Wait until i == 1 */ ret = wait_event_interruptible(&my_wq, i == 1); if (ret < 0) /* We were interrupted. (Probably ^C) */ return ret; OR To wake ONE up: i = 1; wake_up(&my_wq); To wake ALL up: i = 1; wake_up_all(&my_wq);