Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 1995 14:20:07 -0500
From:      Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu>
To:        Peter Dufault <dufault@hda.com>
Cc:        tinguely@plains.nodak.edu (Mark Tinguely), hackers@FreeBSD.org
Subject:   Re: longjump in kernel
Message-ID:  <9502061920.AA26887@halloran-eldar.lcs.mit.edu>
In-Reply-To: <199502041119.GAA26711@hda.com>
References:  <199502040224.AA13601@plains.NoDak.edu> <199502041119.GAA26711@hda.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sat, 4 Feb 1995 06:19:41 -0500 (EST), Peter Dufault <dufault@hda.com> said:

> To set an alarm:
>  -Use "sleep" to wait for the interrupt while in the user process context;

Don't use sleep, ever.  Use tsleep.

>  -Use "timeout" to set a timeout function that will wakeup the context with
>   an error indication set in the event of loss of interrupt.  Return
>   an error code to the user process;

And use the timeout option to tsleep.

>  -Use "untimeout" to cancel the timeout if the interrupt comes in
>   on time.

And this is unnecessary.

-GAWollman

--
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence.  We like people
MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9502061920.AA26887>