Skip to contentSkip to conversation

setjmp/longjmp and/or *context() routines for IA64?

Linux-ia64 Steve Tynor 2 participants 2 messages Oct 25, 2000

lore
Share & tools
lore
#0 lore raw

A few weeks ago, David Mosberger responded to my request for a setjmp implementation that I could use for doing user-mode context switches.

He said that there were pending changes to setjmp that might help:

|  (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.

And further,

|  (4) If the app absolutely must implement its own thread packages, use
|      the *context() routines defined by the Single UNIX Spec.  The
|      only trouble is that they haven't been implemented for Linux yet.
|      (Anyone volunteers?)

I've cvs up'd the latest glibc from http://sources.redhat.com/glibc/ and all I see is version 2.1.95. Are there relevant changes on the 2.2 branch? If so, how do I go about getting access to the latest and greatest? Even if I can't use the glibc setjmp directly, I'm hoping I can adapt it or something like it to what I need. Seeing the diffs David mentions in #2 above might help me better understand how the voodoo works.

Thanks!
Steve

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Steve" = Steve Tynor <[email protected]> writes:

Steve> | (4) If the app absolutely must implement its own thread Steve> packages, use | the *context() routines defined by the Single Steve> UNIX Spec. The | only trouble is that they haven't been Steve> implemented for Linux yet. | (Anyone volunteers?)

Steve> I've cvs up'd the latest glibc from
Steve> http://sources.redhat.com/glibc/ and all I see is version Steve> 2.1.95. Are there relevant changes on the 2.2 branch? If so, Steve> how do I go about getting access to the latest and greatest? Steve> Even if I can't use the glibc setjmp directly, I'm hoping I can Steve> adapt it or something like it to what I need. Seeing the diffs Steve> David mentions in #2 above might help me better understand how Steve> the voodoo works.

2.1.95 *is* the 2.2 branch, whats in sourceware.cygnus.com is the latest.

Jes