Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 1995 17:32:13 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        cimaxp1!jb@werple.net.au (John Birrell)
Cc:        terry@lambert.org, hackers@FreeBSD.org, jb@cimlogic.com.au
Subject:   Re: int type in jmpbuf
Message-ID:  <199511210032.RAA02606@phaeton.artisoft.com>
In-Reply-To: <199511202306.KAA22555@werple.net.au> from "John Birrell" at Nov 21, 95 10:10:53 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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); ??

Shoot the programmer.  8-).

Seriously, nothing requires that the scheduling of threads be preemptive.

If you need it, you should add a system call (like SunOS has) to save
and restore register state, including the FP registers.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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