summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1997-12-06 04:11:14 +0000
committersef <sef@FreeBSD.org>1997-12-06 04:11:14 +0000
commitc7d273eccbdbad69eed3ca880a3956ca804a83c8 (patch)
tree213faf73090825488ed9bc01587c6f942d45f53e /sys/kern/subr_trap.c
parent9821c0958535e623d28d6d4fc1d1ac205a20ec36 (diff)
downloadFreeBSD-src-c7d273eccbdbad69eed3ca880a3956ca804a83c8.zip
FreeBSD-src-c7d273eccbdbad69eed3ca880a3956ca804a83c8.tar.gz
Changes to allow event-based process monitoring and control.
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r--sys/kern/subr_trap.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 8c45d1f..f936fd6 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.117 1997/12/04 14:35:40 jkh Exp $
+ * $Id: trap.c,v 1.118 1997/12/04 21:21:26 jmg 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>
@@ -987,6 +988,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) {
@@ -1037,6 +1040,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);
+
}
/*
OpenPOWER on IntegriCloud