D. writes:
> So I wrote a user threads lib. The threads run in a Solaris process. Signals 
> occur on the stack of whatever thread is currently executing. I get signals, 
> like SIGINT, etc., and can let them unwind naturally. But I thought that I'd 
> like to unwind the exception from within the exception handler, i.e., return 
> to whatever thread was interrupted/signalled without "naturally" unwinding 
> the exception. Does anyone have any insight into how that could be done? I 
> have looked at ucontext.h, found the registers of the thread that was 
> interrupted, in a ucontext_t, but have had no luck trying to unwind things. 
> Are the offsets #defined in /usr/include/sys/regset.h useful when examining 
> what is inside a ucontext_t? Am I trying to do something that is impossible? 
> I am trying to do this on 32-bit Intel arch.

I can't think of a safe way to do that -- one that'll work across the
supported architectures and over time as things change.

Why are you doing this?  Don't the existing threads provide a much
more robust and better-performing solution?  It sounds like you're
recreating the old Solaris 8 two-level thread library, which we
intentionally removed seven years ago because it's an inferior
solution (PSARC 2001/287).

-- 
James Carlson, Solaris Networking              <[email protected]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to