aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/kintpr.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/ki/kintpr.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/ki/kintpr.x')
-rw-r--r--sys/ki/kintpr.x36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/ki/kintpr.x b/sys/ki/kintpr.x
new file mode 100644
index 00000000..ec3b6d4f
--- /dev/null
+++ b/sys/ki/kintpr.x
@@ -0,0 +1,36 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include <config.h>
+include "ki.h"
+
+# KINTPR -- Send a signal (interrupt) to a connected subprocess.
+
+procedure kintpr (pid, vex, status)
+
+int pid # process id
+int vex # virtual exception
+int status # exit status of the job
+
+int server
+int ki_sendrcv()
+include "kichan.com"
+include "kii.com"
+
+begin
+ server = k_node[pid]
+
+ if (server == NULL) {
+ call zintpr (k_oschan[pid], vex, status)
+
+ } else {
+ p_arg[1] = k_oschan[pid]
+ p_arg[2] = vex
+ p_sbuflen = 0
+
+ if (ki_sendrcv (server, KI_ZINTPR, 0) == ERR)
+ status = ERR
+ else
+ status = p_arg[1]
+ }
+end