summaryrefslogtreecommitdiff
path: root/src/sys/include/compat
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-09 17:06:22 -0400
committerIan Moffett <ian@osmora.org>2025-10-09 17:17:52 -0400
commitd1296d7ca780daf7c54520831e6ebb5cbe0a3642 (patch)
treeb2cfda818c7383875a1588ad2bb51408cf6e0903 /src/sys/include/compat
parent22a4e1692886c118955da0326ed45bf4a8f7682e (diff)
kern: iotap: Expose I/O taps to userland
Expose I/O taps to userland using a tap message interface. An application may construct a tap message to send to the kernel requesting data from a specific tap, if there is data, the buffers will be safely populated, otherwise some error returned. An example is accessing the PS/2 keyboard tap: -- char name[] = "i8042.port.0"; char buf[2] = {0, 0}; struct iotap_msg msg = { .opcode = IOTAP_OPC_READ, .buf = buf, .len = len }; ... /* muxtap() may be used */ ... -- Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/compat')
-rw-r--r--src/sys/include/compat/unix/syscall.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sys/include/compat/unix/syscall.h b/src/sys/include/compat/unix/syscall.h
index 5945f75..743e50c 100644
--- a/src/sys/include/compat/unix/syscall.h
+++ b/src/sys/include/compat/unix/syscall.h
@@ -34,6 +34,7 @@
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/syscall.h>
+#include <os/iotap.h>
/*
* Exit the current process - exit(2) syscall
@@ -69,7 +70,8 @@ scret_t(*g_unix_sctab[])(struct syscall_args *) = {
[SYS_query] = sys_query,
[SYS_spawn] = sys_spawn,
[SYS_mount] = sys_mount,
- [SYS_open] = sys_open
+ [SYS_open] = sys_open,
+ [SYS_muxtap] = sys_muxtap
};
#endif /* !_NEED_UNIX_SCTAB */