Path: utzoo!mnetor!uunet!tektronix!orca!tekecs!frip!andrew From: andrew@frip.gwd.tek.com (Andrew Klossner) Newsgroups: comp.unix.wizards Subject: Re: Kernel sleep priorities Message-ID: <9983@tekecs.TEK.COM> Date: 10 May 88 05:41:15 GMT References: <3950@killer.UUCP> <3951@killer.UUCP> <468@micropen> <625@vsi.UUCP> <11290@mimsy.UUCP> Sender: andrew@tekecs.TEK.COM Organization: Tektronix, Wilsonville, Oregon Lines: 18 "It is possible to sleep interruptably, yet keep state, if you are willing either to notice stale states and clean up later, or to use `setjmp' to catch signals through kernel sleeps. Alas, there is only a single place in which the setjmp data is (are?) stored, `u.u_qsave' in 4.3BSD, and it is usually in use by the time you reach a driver." That's not a problem: save u.u_qsave in an "auto" structure, use it for "setjmp", then restore it. (BTW, under system V release 3, you can tell sleep to return to you on interrupt rather than to the outstanding setjmp, bypassing the need to save/restore u.u_qsave. OR PCATCH into the second parameter and sleep will return 1 if the sleep was interrupted, 0 if it wasn't.) -=- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] (andrew%tekecs.tek.com@relay.cs.net) [ARPA]