summaryrefslogtreecommitdiff
path: root/kernel/init/kernel.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-12-11 14:56:58 +0100
committerAnton Kling <anton@kling.gg>2024-12-12 15:48:19 +0100
commitbc828883c51c3c0f35872019f4db632e4ce82dc5 (patch)
treec4217493e69e4e8078aa403ca23f71fdf598f826 /kernel/init/kernel.c
parentb343b0dae5aa51b5bd9b195936358341a943b3b2 (diff)
procfs: Add a procfs
Userland can now interface with processes by writing/reading from `/proc/<pid>/<entry>` It can send signals, for example `echo 15 > /proc/1/signal`
Diffstat (limited to 'kernel/init/kernel.c')
-rw-r--r--kernel/init/kernel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/init/kernel.c b/kernel/init/kernel.c
index 79c6366..5bf959b 100644
--- a/kernel/init/kernel.c
+++ b/kernel/init/kernel.c
@@ -17,6 +17,7 @@
#include <fcntl.h>
#include <fs/devfs.h>
#include <fs/ext2.h>
+#include <fs/procfs.h>
#include <fs/shm.h>
#include <fs/vfs.h>
#include <interrupts.h>
@@ -95,6 +96,7 @@ void kernel_main(u32 kernel_end, unsigned long magic, unsigned long addr,
global_socket_init();
+ vfs_mount("/proc", procfs_mount());
vfs_mount("/dev", devfs_mount());
assert(ahci_init());
vfs_inode_t *ext2_mount_point = ext2_mount();