summaryrefslogtreecommitdiffstats
path: root/io
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-05-22 13:00:41 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-05-22 13:00:41 -0400
commitace65b453151845bc361f21f3e5b651c35f9f126 (patch)
tree262ebd29b0ca1d8584f0b6f1efa7a00d9f4f3e43 /io
parentf004c1ade8d617a82cea2fe249434cccb47a2358 (diff)
downloadjove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.tar.gz
jove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.tar.bz2
jove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.zip
massive refactor for mp and organizationHEADmaster
Diffstat (limited to 'io')
-rw-r--r--io/interrupt.h6
-rw-r--r--io/log.c68
-rw-r--r--io/log.h22
3 files changed, 0 insertions, 96 deletions
diff --git a/io/interrupt.h b/io/interrupt.h
deleted file mode 100644
index 444ff01..0000000
--- a/io/interrupt.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef JOVE_IO_INTERRUPT_H
-#define JOVE_IO_INTERRUPT_H 1
-
-
-
-#endif
diff --git a/io/log.c b/io/log.c
deleted file mode 100644
index 14397a7..0000000
--- a/io/log.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include "log.h"
-#include "lib/jove.h"
-#include "lib/string.h"
-#include "lib/format.h"
-
-static struct LogDevice *s_first_logdev = NULL;
-
-void
-klog_newdev(struct LogDevice *dev)
-{
- if(s_first_logdev == NULL) {
- s_first_logdev = dev;
- }else{
- dev->chain = s_first_logdev;
- s_first_logdev = dev;
- }
-}
-
-static void
-s_klogc(struct LogDevice *dev, char c)
-{
- dev->out(&c, 1);
- if(dev->chain != NULL)
- s_klogc(dev->chain, c);
-}
-
-void
-klogc(char c)
-{
- s_klogc(s_first_logdev, c);
-}
-
-static void
-s_klogs(struct LogDevice *dev, const char *s, size_t slen)
-{
- dev->out(s, slen);
- if(dev->chain != NULL)
- s_klogs(dev->chain, s, slen);
-}
-
-void
-klogs(const char *s)
-{
- size_t slen = strlen(s);
- s_klogs(s_first_logdev, s, slen);
-}
-
-void
-klogsn(const char *s, size_t len)
-{
- s_klogs(s_first_logdev, s, len);
-}
-
-void
-kvlogf(const char *fmt, va_list ap)
-{
- char buffer[256];
- svfmt(buffer, 256, fmt, ap);
- klogs(buffer);
-}
-
-void klogf(const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- kvlogf(fmt, ap);
- va_end(ap);
-}
diff --git a/io/log.h b/io/log.h
deleted file mode 100644
index ad1526d..0000000
--- a/io/log.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#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