Query: unw_getcontext
OS: debian
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
UNW_GETCONTEXT(3) Programming Library UNW_GETCONTEXT(3)NAMEunw_getcontext -- get initial machine-stateSYNOPSIS#include <libunwind.h> int unw_getcontext(unw_context_t *ucp);DESCRIPTIONThe unw_getcontext() routine initializes the context structure pointed to by ucp with the machine-state of the call-site. The exact set of registers stored by unw_getcontext() is platform-specific, but, in general, at least all preserved (``callee-saved'') and all frame-related registers, such as the stack-pointer, will be stored. This routine is normally implemented as a macro and applications should not attempt to take its address. PLATFORM-SPECIFIC NOTES On IA-64, unw_context_t has a layout that is compatible with that of ucontext_t and such structures can be initialized with getcontext() instead of unw_getcontext(). However, the reverse is not true and it is not safe to use structures initialized by unw_getcontext() in places where a structure initialized by getcontext() is expected. The reason for this asymmetry is that unw_getcontext() is optimized for maximum performance and does not, for example, save the signal mask.RETURN VALUEOn successful completion, unw_getcontext() returns 0. Otherwise, a value of -1 is returned.THREAD AND SIGNAL SAFETYunw_getcontext() is thread-safe as well as safe to use from a signal handler.SEE ALSOlibunwind(3), unw_init_local(3)AUTHORDavid Mosberger-Tang Email: dmosberger@gmail.com WWW: http://www.nongnu.org/libunwind/. Programming Library 16 August 2007 UNW_GETCONTEXT(3)
Related Man Pages |
---|
unw_flush_cache(3) - debian |
unw_get_fpreg(3) - debian |
unw_getcontext(3) - debian |
unw_set_caching_policy(3) - debian |
unw_set_fpreg(3) - debian |
Similar Topics in the Unix Linux Community |
---|
Introduction to Waterken Programming |