Allows saving the current execution state or context.
#include <sys/types.h> #include <sys/errno.h>
int setjmpx (jump_buffer) label_t *jump_buffer;
|jump_buffer||Specifies the address of the caller-supplied jump buffer that was specified on the call to the setjmpx service.|
The setjmpx kernel service saves the current execution state, or context, so that a subsequent longjmpx call can cause an immediate return from the setjmpx service. The setjmpx service saves the context with the necessary state information including:
Other state variables include the nonvolatile general purpose registers, the current program's table of contents and stack pointers, and the return address.
Calls to the setjmpx service can be nested. Each call to the setjmpx service causes the context at this point to be pushed to the top of the stack of saved contexts.
The setjmpx kernel service can be called from either the process or interrupt environment.
|Nonzero value||Indicates that a longjmpx call caused the setjmpx service to return.|
|0||Indicates any other circumstances.|
The setjmpx kernel service is part of the Base Operating System (BOS) Runtime.
The clrjmpx kernel service, longjmpx kernel service.
Handling Signals While in a System Call, Exception Processing, Implementing Kernel Exception Handlers, Process and Exception Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.