Date: Thu, 14 Nov 2002 14:38:09 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Doug Rabson <dfr@nlsystems.com> Cc: ia64@FreeBSD.org Subject: setjmp/longjmp and libc_r [was: Re: cvs commit: src/lib/libc/ia64/gen _setjmp.S] Message-ID: <20021114143809.A31710@kayak.xcllnt.net> In-Reply-To: <200211141951.41202.dfr@nlsystems.com> References: <200211140640.gAE6eNq9016231@repoman.freebsd.org> <1037298535.19149.8.camel@builder02.qubesoft.com> <20021114194057.GA856@dhcp01.pn.xcllnt.net> <200211141951.41202.dfr@nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[moved to ia64@] On Thu, Nov 14, 2002 at 07:51:41PM +0000, Doug Rabson wrote: > > > > All you really need to achieve is that ar.bsp equals ar.bspstore > > > > before you set ar.bspstore, right? > > > > (note that the loadrs is missing a cover or an alloc) > > > > > > You would need a flushrs if you really wanted to use longjmp for > > > thread switching, otherwise you would lose the stacked registers of > > > the thread you were switching away from. > > > > But you need a setjmp to save that context, right? How would you > > otherwise return to the thread? > > I've managed to reload my memory from magtape :-). To use setjmp/longjmp > for thread switching, you would need to call flushrs from setjmp. That > would simplify longjmp at the cost of severely pessimising setjmp. This is exactly what we now have and what I'm willing to sacrificy at this time. It's easy enough to optimize setjmp/longjmp once we have the *context stuff. Note that I'm still not convinced that not doing a flushrs in setjmp will work when a signal handler on the alternate stack jumps to the saved context on the regular stack. You cannot compare the saved ar.bsp or ar.bspstore with the current ar.bspstore without taking into account that they may not be on the same register stack. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021114143809.A31710>