.th K_interrupt_return II 4/21/86
.sh NAME
K_interrupt_return - return from pseudo-interrupt
.sh "MODULA SYNOPSIS"
.nh
.na
 VAR stat: K_err_num;
.br
 . . .
.br
 stat := NK_interrupt_return;
.br
.hy
.ad
.sp
.sh "C SYNOPSIS"
.nh
.na
 int stat;
.br
 . . .
.br
 stat = K_interrupt_return ( );
.br
.hy
.ad
.sh DESCRIPTION
K_interrupt_return provides an atomic return operation from pseudo
interrupts.  It can be thought of as being analogous to the PDP-11 RTI
(return from interrupt) and RTT (return from interrupt inhibiting T-bit
trap) instructions.  When a pseudo interrupt occurs, the program
counter, processor status word, and current pseudo interrupt level are
saved in a pseudo interrupt vector for the particular type of pseudo
interrupt which occurred.  In the PDP-11 implementation, these vectors
are located at fixed locations in the supervisor domain.  The
K_interrupt_return call restores the process state from these saved
values.  Because the interrupted process state is accessible to the
process, the K_interrupt_return call checks the saved state prior to
restoring it.  The process is not permitted to increase its
privileges or accessible domains.  (Similar checking takes place in the
processing of the pseudo interrupt itself.)
.sh EXCEPTIONS
.lp 22 15
XbdAddr	Bad address in saved state. Cannot return.
.lp 22 15
XbPsLev	Bad pseudo-interrupt level in saved state. 
Cannot return.
.lp 22 15
XsgNoAcc	No access to segment specified in saved
state address. Cannot return.
.i0
.sh "SEE ALSO"
K_post(II),
K_set_pil(II),
K_signal(II),
ipc_block(IIa)
