1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-25 02:41:45 +02:00

Add new Platform-specific Notes section and document that getcontext()

can be used in lieu of unw_getcontext() but not vice versa.

(Logical change 1.196)
This commit is contained in:
mostang.com!davidm 2004-03-31 00:52:17 +00:00
parent e0f02d4775
commit 37e20822f4

View file

@ -26,6 +26,17 @@ stack-pointer, will be stored.
This routine is normally implemented as a macro and applications
should not attempt to take its address.
\section{Platform-specific Notes}
On IA-64, \Type{unw\_context\_t} has a layout that is compatible with
that of \Type{ucontext\_t} and such structures can be initialized with
\Func{getcontext}() instead of \Func{unw\_getcontext}(). However, the
reverse is \emph{not} true and it is \emph{not} safe to use structures
initialized by \Func{unw\_getcontext()} in places where a structure
initialized by \Func{getcontext()} is expected. The reason for this
asymmetry is that \Func{unw\_getcontext()} is optimized for maximum
performance and does not, for example, save the signal mask.
\section{Return Value}
On successful completion, \Func{unw\_getcontext}() returns 0.