LONGJMP(K) UNIX System V LONGJMP(K)
Name
longjmp - ends current system call with error
Syntax
#include "sys/user.h"
int
longjmp(u.u_qsav)
label_t u.u_qsav;
Description
The longjmp routine passes control of the current process to
the end of the current system call. The system call then
returns to user space with the external variable errno set
to the EINTR error code. Each time a driver is called by
the kernel, registers are saved in u.u_qsav. The longjmp
routine restores these registers, sets u.u_error to EINTR,
and then jumps to the end of the current system call. The
effect from a driver's perspective is that the jump returned
control of the process back to the calling user process with
an error set.
This routine must never be called from an initialization or
interrupt routine.
longjmp is called by sleep(K) if a signal is received
directed at the sleeping process, and if the priority
argument to sleep is not ORed with PCATCH.
longjmp(K) differs from the user space longjmp(S) in three
ways: the intent is different, the arguments are different,
and kernel longjmp is not used in conjunction with a setjmp
routine. Use of the setjmp kernel routine is not supported.
Parameters
u.u_qsav contains register information. This is the only
argument that should ever be passed to longjmp.
See Also
sleep(K), setjmp(S)
(printed 7/7/89)