summaryrefslogtreecommitdiffstats
path: root/io/log.h
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-03-11 21:30:31 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-03-11 21:30:31 -0400
commitd1ff7bcc91886626dc9060ec5fb67ee102ab7c1d (patch)
tree8f0b5cd8aad31089131785dc6e37b659490f9955 /io/log.h
downloadjove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.tar.gz
jove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.tar.bz2
jove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.zip
usermode capable kernel with logging syscall
Diffstat (limited to 'io/log.h')
-rw-r--r--io/log.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/io/log.h b/io/log.h
new file mode 100644
index 0000000..ad1526d
--- /dev/null
+++ b/io/log.h
@@ -0,0 +1,22 @@
+#ifndef JOVE_IO_LOG_H
+#define JOVE_IO_LOG_H 1
+
+#include <stddef.h>
+
+struct LogDevice
+{
+ void (*out)(const char*, size_t);
+ struct LogDevice *chain;
+};
+
+void klog_newdev(struct LogDevice *dev);
+
+void klogc(char c);
+void klogs(const char *s);
+void klogsn(const char *s, size_t len);
+
+#include <stdarg.h>
+void kvlogf(const char *fmt, va_list ap);
+void klogf(const char *fmt, ...);
+
+#endif