Hi,

At Wed, 1 Apr 2009 07:45:15 +0900,
Graham Agnew wrote in [ruby-core:23086]:
> I've been looking through the Ruby source code, specifically
> the Itanium specific code wrapped in "#ifdef __ia64" guards
> and within the assembly file ia64.s.  While I can follow the
> references to the Intel documentation, it seems that the
> Itanium code is there to find the position of the register
> stack.  There's also rb_ia64_flushrs in conjunction with
> setjmp() inside the function rb_gc_save_machine_context.

Is it an ia64 specific issue?

> According to the referenced documents, this only applies when
> performing longjmp across threads, and I can't find any cases
> in the code where this is happening.  At the same time, since
> setcontext and getcontext seem to be fairly widely available,
> shouldn't the source code be switched to use those?  They
> seem to be more appropriate for managing context.

It shouldn't jump across threads.  And getcontext/setcontext
has significant performance penalty than setjmp/longjmp.

If it is ia64 specific, getcontext/setcontext should be used on
such platforms.

-- 
Nobu Nakada