public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] setjmp/longjmp redux
Date: Thu, 14 Jun 2001 20:06:12 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005734@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005732@msgid-missing>

>>>>> On Thu, 14 Jun 2001 15:15:09 -0400, chas williams <chas@cmf.nrl.navy.mil> said:

  Chas> hi, new to the list but i did a little reading of the archives
  Chas> and it seems that setjmp/longjmp cant do what i need -- switch
  Chas> the stack.

  Chas> why do i want to do this?  i am working on porting openafs
  Chas> which provides its own thread library (called lwp) that is
  Chas> implemented with setjmp/longjmp.  what needs to be done in
  Chas> order to make this work?  based on my reading it seems that
  Chas> ar.rnat (???) need to be saved between the context switches?
  Chas> i dont know much about the ia64 architecture so if someone
  Chas> could give me some pointers i would be grateful.

For synchronous context switches ("co-routines"), use
makecontext()/setcontext() et al.  They have been added to glibc
recently.  If you're not familiar with these routines, there is an
example in the glibc source tree in stdlib/tst-setcontext.c.
Additional usage notes can be found in in answer 4.10 of the glibc
FAQ.

	--david


      reply	other threads:[~2001-06-14 20:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-14 19:15 [Linux-ia64] setjmp/longjmp redux chas williams
2001-06-14 20:06 ` David Mosberger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590693005734@msgid-missing \
    --to=davidm@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox