From owner-freebsd-hackers Mon Feb 6 10:02:12 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id KAA16160 for hackers-outgoing; Mon, 6 Feb 1995 10:02:12 -0800 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id KAA16146 for ; Mon, 6 Feb 1995 10:01:47 -0800 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA14568; Mon, 6 Feb 1995 19:03:14 +0100 Received: by sax.sax.de (8.6.9/8.6.9-s1) with UUCP id TAA26117 for freebsd-hackers@freebsd.org; Mon, 6 Feb 1995 19:03:14 +0100 Received: by bonnie.tcd-dresden.de (8.6.8/8.6.6) id SAA17073; Mon, 6 Feb 1995 18:44:11 +0100 From: j@uriah.sax.de (J Wunsch) Message-Id: <199502061744.SAA17073@bonnie.tcd-dresden.de> Subject: Re: longjump in kernel To: freebsd-hackers@FreeBSD.org (FreeBSD hackers) Date: Mon, 6 Feb 1995 18:44:11 +0100 (MET) In-Reply-To: <199502041119.GAA26711@hda.com> from "Peter Dufault" at Feb 4, 95 06:19:41 am X-Phone: +49-351-8141 137 Reply-To: joerg_wunsch@uriah.sax.de X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1276 Sender: hackers-owner@FreeBSD.org Precedence: bulk As Peter Dufault wrote: | | To set an alarm: | -Use "sleep" to wait for the interrupt while in the user process context; | -Use "wakeup" from the vertical sync interrupt to continue the blocked context; | -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; | -Use "untimeout" to cancel the timeout if the interrupt comes in | on time. Better yet, use tsleep() which does 1), 3) and 4) of the above, and allows for a short descriptive string indicating the sleep reason when looking at the `ps' output. If the timeout hit, the tsleep() returns EWOULDBLOCK. | This must be covered in the "The Design of the 4.3 OS" book by | Leffler, Mckusick, and Karels. (Addison Wesley? We should add a | bibliography section to the FAQ) Or time for another manual section covering kernel internal functions. (Btw., Data General's DG/UX used to have a subsection of section 3 covering the kernel functions in recent releases.) -- cheers, J"org work: --- no longer --- private: joerg_wunsch@uriah.sax.de Never trust an operating system you don't have sources for. ;-)