Subject: Re: Delaying...
To: Peter Seebach <seebs@plethora.net>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: current-users
Date: 03/09/2002 16:13:29
seebs@plethora.net (Peter Seebach) writes:

> I want to experiment with delaying my mouse resets a bit; obviously, the
> best solution is not to do actual delay(), because that's a busy loop
> (right?).  What's a good way for a kernel thread to say "go on without me for
> another tenth of a second"?

The tsleep() function takes a timeout parameter. You'd want something
like:

tsleep(&sc->sc_reset_flag, PWAIT, "pmsreset", HZ/10);

        - Nathan