Sync with sys/i386/i386/trap.c revision 1.119.

This commit is contained in:
KATO Takenori 1997-12-06 06:19:19 +00:00
parent 9aa446f543
commit 1f4fb6dff8

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.40 1997/12/03 09:46:34 kato Exp $
* $Id: trap.c,v 1.41 1997/12/05 11:48:53 kato Exp $
*/
/*
@ -50,6 +50,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
#include <sys/kernel.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
@ -1037,6 +1038,8 @@ syscall(frame)
p->p_retval[0] = 0;
p->p_retval[1] = frame.tf_edx;
STOPEVENT(p, S_SCE, callp->sy_narg);
error = (*callp->sy_call)(p, args);
switch (error) {
@ -1087,6 +1090,14 @@ bad:
if (KTRPOINT(p, KTR_SYSRET))
ktrsysret(p->p_tracep, code, error, p->p_retval[0]);
#endif
/*
* This works because errno is findable through the
* register set. If we ever support an emulation where this
* is not the case, this code will need to be revisited.
*/
STOPEVENT(p, S_SCX, code);
}
/*