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.
The threads library doesn't _have_ to use ucontext, but both the
kernel and the threads library have to agree to some format (the
kernel has to pass register state out to the threads library when
threads once blocked in the kernel become unblocked).

> 
> I was wrong about this being necessary for the JDK. Linux doesn't implement
> it either (it does have man pages and header files though!) and the JDK
> runs fine on Linux. I was mislead by the some of these calls, which will
> always fail on Linux.

Dan Eischen
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to