On Sun, 2005-07-03 at 20:17 +0200, Jesper Juhl wrote: > while (1) { .... > } else if (time_before(jiffies, wait_until)) { > set_current_state(TASK_INTERRUPTIBLE); > schedule_timeout(HZ); > } else { Please don't do the manual task state setting. It's preferable to just use msleep_interruptable(). jiffies and HZ can change with each kernel configuration, and are not dependable. I've attached an untested patch that cleans up the init function a bit (I think). -- Dave