Date: Wed, 22 Mar 2000 12:52:39 -0800 From: Arun Sharma <adsharma@sharmas.dhs.org> To: Daniel Eischen <eischen@vigrid.com> Cc: current@FreeBSD.ORG Subject: Re: ucontext Message-ID: <20000322125239.A2646@sharmas.dhs.org> In-Reply-To: <Pine.SUN.3.91.1000322143136.19280A-100000@pcnet1.pcnet.com>; from Daniel Eischen on Wed, Mar 22, 2000 at 02:48:24PM -0500 References: <20000322095619.A30197@sharmas.dhs.org> <Pine.SUN.3.91.1000322143136.19280A-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 22, 2000 at 02:48:24PM -0500, Daniel Eischen wrote: > On Wed, 22 Mar 2000, Arun Sharma wrote: > > > On Wed, Mar 22, 2000 at 08:04:37AM -0500, Daniel Eischen wrote: > > > > > > I had them implemented and working for i386, and even had a hacked up > > > libc_r that used them instead of setjmp/longjmp. This was a few months > > > ago under 4.0-current. At the time, I thought they'd be better off > > > implemented as syscalls, but now I'm leaning towards library routines > > > similar to setjmp/longjmp (which make a syscall to change the signal > > > mask). > > > > > > > UNIX 98 specifies that setcontext should be callable from signal handlers. > > http://www.opengroup.org/onlinepubs/007908799/xsh/getcontext.html > > > > That pretty much means system calls. Doesn't it ? > > I don't know, does it? The reason we don't want it to be a system > call is that if the threads library is going to use it to save and > restore thread state, we don't want the overhead of a system call. You're right. It doesn't have to be a system call, just to support longjmp'ing or doing setcontext from signal handlers. However, I can think of two situations under which it might have to be a system call: (a) If the user is allowed to modify the system mode context of the processor i.e. things that can be done only in the privileged mode. (b) If one needs to get the context of other blocked processes Neither of the two sound like strong reasons to me. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000322125239.A2646>
