aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/inc/sys.h4
-rw-r--r--libc/sys.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/libc/inc/sys.h b/libc/inc/sys.h
index 0914bc4..99f5920 100644
--- a/libc/inc/sys.h
+++ b/libc/inc/sys.h
@@ -4,7 +4,8 @@
#ifndef SYS_H
#define SYS_H
-enum sys { SYS_LOOP, SYS_MALLOC, SYS_FREE, SYS_READ, SYS_WRITE, SYS_EXEC, SYS_EXIT };
+enum sys { SYS_LOOP, SYS_MALLOC, SYS_FREE, SYS_READ, SYS_WRITE, SYS_EXEC, SYS_EXIT, SYS_MAP };
+enum event { EVENT_KEYBOARD, EVENT_MOUSE };
#if defined(userspace)
@@ -30,6 +31,7 @@ int sysv(enum sys num, ...);
while (1) { \
} \
}
+#define map(id, func) sys2(SYS_MAP, (int)id, (int)func)
#endif
#endif
diff --git a/libc/sys.c b/libc/sys.c
index a2c789e..bfc7a22 100644
--- a/libc/sys.c
+++ b/libc/sys.c
@@ -57,7 +57,6 @@ int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5)
return a;
}
-#include <print.h>
int sysv(enum sys num, ...)
{
va_list ap;