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

longjmpx Kernel Service

Purpose

Allows exception handling by causing execution to resume at the most recently saved context.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int longjmpx (ret_val)
int ret_val;

Parameters

ret_val Specifies the return value to be supplied on the return from the setjmpx kernel service for the resumed context. This value normally indicates the type of exception that has occurred.

Description

The longjmpx kernel service causes the normal execution flow to be modified so that execution resumes at the most recently saved context. The kernel mode lock is reacquired if it is necessary. The interrupt priority level is reset to that of the saved context.

The longjmpx service internally calls the clrjmpx service to remove the jump buffer specified by the jump_buffer parameter from the list of contexts to be resumed. The longjmpx service always returns a nonzero value when returning to the restored context. Therefore, if the value of the ret_val parameter is 0, the longjmpx service returns an EINTR value to the restored context.

If there is no saved context to resume, the system crashes.

Execution Environment

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

Return Values

A successful call to the longjmpx service does not return to the caller. Instead, it causes execution to resume at the return from a previous setjmpx call with the return value of the ret_val parameter.

Implementation Specifics

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

Related Information

The clrjmpx kernel service, setjmpx kernel service.

Understanding Exception Handling in AIX Kernel Extensions and Device Support Programming Concepts.

Process and Exception Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]