From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: re: [Linux-ia64] setjmp/longjmp : flushing register stack
Date: Wed, 27 Sep 2000 19:05:55 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205522@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205495@msgid-missing>
>>>>> On Wed, 27 Sep 2000 10:04:15 -0700, David Mosberger <davidm@hpl.hp.com> said:
David> Like I said before: the flushrs won't help at all. The real
David> issue is preserving ar.rnat (which is probably a problem you
David> have not run into yet).
Steve pointed out that I hadn't said that on the linux-ia64 mailing
list. I think he's right, so my apologies.
Here is a quick summary on the issue of setjmp/longjmp and their use
for context-switching:
(1) as far as the current implementation is concerned, putting a
flushrs in setjmp will make absolutely no difference because the
state saved in the jmp_buf will be identical with or without the
flushrs.
(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.
(3) the use of setjmp()/longjmp() for context switching is NOT
recommended; linuxthreads/pthreads is preferable since that will
allow to take advantage of multiple CPUs and is fully supported
by libc.
(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?)
Hope this clarifies the situation.
--david
prev parent reply other threads:[~2000-09-27 19:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-15 15:17 [Linux-ia64] setjmp/longjmp : flushing register stack SCHAN
2000-09-15 15:38 ` H . J . Lu
2000-09-15 15:43 ` David Mosberger
2000-09-27 16:07 ` Steve Tynor
2000-09-27 17:04 ` David Mosberger
2000-09-27 18:25 ` Boehm, Hans
2000-09-27 19:05 ` 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-105590678205522@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