Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2003 20:39:24 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ia64/include setjmp.h src/lib/libc/ia64/gen _setjmp.S src/lib/libc_r/uthread pthread_private.h
Message-ID:  <200303050439.h254dOir001081@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2003/03/04 20:39:24 PST

  FreeBSD src repository

  Modified files:
    sys/ia64/include     setjmp.h 
    lib/libc/ia64/gen    _setjmp.S 
    lib/libc_r/uthread   pthread_private.h 
  Log:
  Fix threaded applications on ia64 that are linked dynamicly. We did
  not save (restore) the global pointer (GP) in the jmpbuf in setjmp
  (longjmp) because it's not needed in general. GP is considered a
  scratch register at callsites and hence is always restored after a
  call (when it's possible that the call resolves to a symbol in a
  different loadmodule; otherwise GP does not have to be saved and
  restored at all), including calls to setjmp/longjmp. There's just
  one problem with this now that we use setjmp/longjmp for context
  switching: A new context must have GP defined properly for the
  thread's entry point. This means that we need to put GP in the
  jmpbuf and consequently that we have to restore is in longjmp.
  This automaticly requires us to save it as well.
  
  When setjmp/longjmp isn't used for context switching, this can be
  reverted again.
  
  Revision  Changes    Path
  1.10      +5 -3      src/lib/libc/ia64/gen/_setjmp.S
  1.79      +1 -0      src/lib/libc_r/uthread/pthread_private.h
  1.10      +2 -1      src/sys/ia64/include/setjmp.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-src" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303050439.h254dOir001081>