summaryrefslogtreecommitdiff
path: root/src/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init/main.c')
-rw-r--r--src/init/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 06e59a2..dc5a975 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -1,4 +1,5 @@
#include <init/types.h>
+#include <shared/flags.h>
#include <shared/syscalls.h>
#include <stdint.h>
@@ -8,6 +9,8 @@
__attribute__((section("text")))
int tty_fd;
+int test;
+
void fs_test(void);
int main(void) {
@@ -16,6 +19,9 @@ int main(void) {
_syscall_exit(argify("couldn't open tty"));
log(" opened /tty ");
+ _syscall_memflag(&test, sizeof(int), MEMFLAG_PRESENT);
+ test = 0; // would cause a pagefault without the memflag call
+
fs_test();
_syscall_exit(argify("my job here is done."));
}