[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

setjmpx Kernel Service


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.

Execution Environment

The setjmpx kernel service can be called from either the process or interrupt environment.

Return Values

Nonzero value Indicates that a longjmpx call caused the setjmpx service to return.
0 Indicates any other circumstances.

Implementation Specifics

The setjmpx kernel service is part of the Base Operating System (BOS) Runtime.

Related Information

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.

[ Previous | Next | Contents | Home | Search ]