Subject: Re: equivalent for wait_event_interruptible in netbsd ?
To: Nalin Gupta <>
From: Allen Briggs <>
List: tech-kern
Date: 02/09/2007 10:06:00
On Fri, Feb 09, 2007 at 05:48:01PM +0530, Nalin Gupta wrote:
> Could any one advice me how to achieve linux
> "wait_event_interruptible" like functionality.
> where I need a process making ioctl to go for sleep on some queue for
> some timeout and condition.
> I guess tsleep could be used for this.

That would be correct.  The first parameter is just a unique token.
When you want to "raise the event," use the same token in wakeup().
wakeup() will wake up all sleepers using that ident.  So if you have
multiple sleepers using the same ident and only want one to run, you
need to take extra steps to prevent races.


Allen Briggs  |  |