[Linux-ia64] more on setjmp()/longjmp()

From: David Mosberger <davidm_at_hpl.hp.com>
Date: 2001-02-15 06:19:07
A while ago I wrote:

  (2) The current setjmp()/longjmp() implementation cannot be used for
      stack switching purposes, because it does not preserve ar.rnat.
      There was some discussion on what we should do about this and the
      conclusion was to fix the routines so they do preserve ar.rnat.
      The main argument for changing the routines was that the IA-64
      SCRA requires ar.rnat to be part of the jmp_buf.

Well, it turns out the SCRA was not quite clear on this topic:
apparently the _intent_ was not to require a flushrs in setjmp() and
the requirement of saving ar.rnat was indirectly contradicting this
intent.  I understand the SCRA is being fixed so that this will be
made clearer (and ar.rnat is no longer mentioned as a register that
must be saved in the jump buffer).

Because of this, I'd like to recommend that we keep the current
setjmp()/longjmp() implementation.  The implication of this is that
the routines may not be used for switching stacks.  If an application
needs to do this, it should use the *context() routines (which still
need to be implemented...).

Don, could you update the setjmp() TODO list entry accordingly?

Thanks,

	--david
Received on Wed Feb 14 11:20:02 2001

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:02 EST