Date: Tue, 4 Apr 2000 22:23:57 -0600 (MDT) From: Nate Williams <nate@yogotech.com> To: Daniel Eischen <eischen@vigrid.com> Cc: current@FreeBSD.ORG, sprice@hiwaay.net Subject: Re: signal mask from jmp_buf Message-ID: <200004050423.WAA12987@nomad.yogotech.com> In-Reply-To: <200004050417.AAA04115@pcnet1.pcnet.com> References: <200004050417.AAA04115@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > What is the proper way for obtaining the signal mask from > > within the jmp_buf struct on 4.x or -current? Previously > > with the JDK port for < 3.x we did something like this: > > > > signalMask = jmpbuf[0]._sjb[6]; > > > > This no longer works now that we support >32 signals. Is > > there a better, more portable way that will work for all > > versions of FreeBSD? > > > > Thanks. > > Hmm, OK, I'll bite. > > One of the things I've been looking at is getting rid of the > sigprocmask() calls within setjmp/longjmp for libc_r (basically > just switching to use _setjmp/_longjmp instead, since the > threads library already knows what the signal mask of each > thread is). Note, the JDK doesn't use the threads library, and instead uses it's own thread library that is optimized for the JDK, so a solution that is specific to libc_r won't necessarily help the JDK, although it may help others. > If we supported {get,set}context, I'd say use those instead > of setjmp/longjmp since the signal mask is in ucp->uc_sigmask. > I do have working {get,set,make,swap}context implemented as > library routines for i386 (and also _getcontext,_setcontext > which don't get/set the signal masks), and am working on the > alpha bits (could use some help here). > > I am unfamiliar with the JDK port. Does it use FreeBSD native > threads? Nope, see above. If/when FreeBSD gets 'real' kernel threads, it would be worthwhile to move it to using them, but until that team my suspicion is the optimzed 'threads' library that is part of the JDK probably is an easier solution for the JDK. However, Steve may have a different opinion. :) Nate 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?200004050423.WAA12987>