summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/kernel/con.h5
-rw-r--r--include/kernel/sys.h7
-rw-r--r--include/kernel/vsprintf.h14
-rw-r--r--include/stdio.h10
-rw-r--r--include/time.h15
-rw-r--r--include/unistd.h3
6 files changed, 33 insertions, 21 deletions
diff --git a/include/kernel/con.h b/include/kernel/con.h
index 8777342..178a0d3 100644
--- a/include/kernel/con.h
+++ b/include/kernel/con.h
@@ -1,7 +1,7 @@
/*
* con.h
*
- * Basic VGA text console. Implements printf() and puts().
+ * Basic VGA text console. Implements printk() and puts().
*/
#ifndef _CON_H
@@ -11,7 +11,6 @@ void con_init(void);
void con_clear(void);
-int puts(char *s);
-int printf(char*, ...);
+int printk(char*, ...);
#endif
diff --git a/include/kernel/sys.h b/include/kernel/sys.h
index ea54f14..7c129d2 100644
--- a/include/kernel/sys.h
+++ b/include/kernel/sys.h
@@ -1,11 +1,12 @@
typedef int (*syscall_t) (void);
-extern int sys_print(void);
+extern int sys_puts(void);
+extern int sys_time(void);
extern int sys_dummy(void);
syscall_t call_table[256] = {
- [0] = &sys_print,
- [1] = &sys_dummy,
+ [0] = &sys_puts,
+ [1] = &sys_time,
[2] = &sys_dummy,
[3] = &sys_dummy,
[4] = &sys_dummy,
diff --git a/include/kernel/vsprintf.h b/include/kernel/vsprintf.h
deleted file mode 100644
index 08297d6..0000000
--- a/include/kernel/vsprintf.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * vsprintf.h
- *
- * A very basic implmentation of thr vsprintf function
- */
-
-#ifndef _VSPRINTF_H
-#define _VSPRINTF_H
-
-#include <stdarg.h>
-
-int vsprintf(char*, char*, va_list);
-
-#endif
diff --git a/include/stdio.h b/include/stdio.h
new file mode 100644
index 0000000..d37699a
--- /dev/null
+++ b/include/stdio.h
@@ -0,0 +1,10 @@
+#ifndef _STDIO_H
+#define _STDIO_H
+
+#include <stdarg.h>
+
+int printf(char*, ...);
+
+int vsprintf(char*, char*, va_list);
+
+#endif
diff --git a/include/time.h b/include/time.h
new file mode 100644
index 0000000..732d33f
--- /dev/null
+++ b/include/time.h
@@ -0,0 +1,15 @@
+#ifndef _TIME_H
+#define _TIME_H
+
+#include <stdint.h>
+
+#ifndef _TIME_T
+#define _TIME_T
+typedef int32_t time_t;
+#endif
+
+time_t time(void);
+
+void sleep(time_t);
+
+#endif
diff --git a/include/unistd.h b/include/unistd.h
index c63ac6a..ae46b16 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,7 +1,8 @@
#ifndef _UNISTD_H
#define _UNISTD_H
-#define __SYS_print 0
+#define __SYS_puts 0
+#define __SYS_time 1
#define _syscall0(type, name) \
type name(void) { \