src/sys/mips/mips/pm_machdep.c
/*
 * System call to cleanup state after a signal
 * has been taken.  Reset signal mask and
 * stack state from context left by sendsig (above).
 * Return to previous pc as specified by
 * context left by sendsig.
 */
System call to cleanup state after a signal
has been taken.  Reset signal mask and
stack state from context left by sendsig (above).
Return to previous pc as specified by
context left by sendsig.
System call to cleanup state after a signal has been taken . Reset signal mask and stack state from context left by sendsig ( above ) . Return to previous pc as specified by context left by sendsig .
int
sys_sigreturn(struct thread *td, struct sigreturn_args *uap)
{
	ucontext_t uc;
	int error;
	error = copyin(uap->sigcntxp, &uc, sizeof(uc));
	if (error != 0)
	    return (error);
	error = set_mcontext(td, &uc.uc_mcontext);
	if (error != 0)
		return (error);
	kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0);
	return (EJUSTRETURN);
}
int sys_sigreturn ( struct thread * td , struct sigreturn_args * uap ) { ucontext_t uc ; int error ; error = copyin ( uap -> sigcntxp , & uc , sizeof ( uc ) ) ; if ( error != 0 ) return ( error ) ; error = set_mcontext ( td , & uc . uc_mcontext ) ; if ( error != 0 ) return ( error ) ; kern_sigprocmask ( td , SIG_SETMASK , & uc . uc_sigmask , NULL , 0 ) ; return ( EJUSTRETURN ) ; }
System call to cleanup state after a signal
 has been taken.
System call to cleanup state after a signal has been taken .