From owner-freebsd-hackers Mon Nov 20 15:59:15 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA25879 for hackers-outgoing; Mon, 20 Nov 1995 15:59:15 -0800 Received: from werple.net.au (0@werple.mira.net.au [203.9.190.18]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id PAA25868 for ; Mon, 20 Nov 1995 15:59:06 -0800 Received: from cimaxp1.UUCP (Ucimlogi@localhost) by werple.net.au (8.7/8.7.1) with UUCP id KAA22558 for hackers@FreeBSD.org; Tue, 21 Nov 1995 10:06:58 +1100 (EST) Message-Id: <199511202306.KAA22558@werple.net.au> X-Authentication-Warning: werple.net.au: Ucimlogi set sender to cimaxp1!jb using -f Received: by cimaxp1.cimlogic.com.au; (5.65/1.1.8.2/10Sep95-0953AM) id AA15279; Tue, 21 Nov 1995 10:10:54 +1100 From: John Birrell Subject: Re: int type in jmpbuf To: terry@lambert.org (Terry Lambert) Date: Tue, 21 Nov 1995 10:10:53 +1100 (EST) Cc: hackers@FreeBSD.org, jb@cimlogic.com.au In-Reply-To: <199511202141.OAA02182@phaeton.artisoft.com> from "Terry Lambert" at Nov 20, 95 02:41:23 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.org Precedence: bulk > Actually, the occurance of a signal condittion give you the _opportunity_ > to set a flag. But not necessarily an opportunity to _check_ the flag. > > Then you check the flag on a blocking call *not* in the signal handler > before actually making the call to decide to do the context switch, and > the problem goes away. But if the running thread is not about to do any blocking calls, then it can only be preempted by making a decision in the signal handler. The signal handler has to perform the context switch. How else can we time slice between two threads each doing while(1); ?? > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. > -- John Birrell CIMlogic Pty Ltd jb@cimlogic.com.au 119 Cecil Street Ph +61 3 9690 9600 South Melbourne Vic 3205 Fax +61 3 9690 6650 Australia Mob +61 18 353 137