summaryrefslogtreecommitdiff
path: root/include/user/user.h
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2025-12-28 01:48:50 +0800
committerRichard Qin <richard.qin.x@gmail.com>2025-12-28 01:48:50 +0800
commitf3c8918b13a5226f53e7870d60436f812e5d9015 (patch)
tree5a934b82f23916e67e8cac9d230af93645611f3a /include/user/user.h
parenta82ab8ad6d277ededc128678aebabf5fbdb01c45 (diff)
downloadlume-f3c8918b13a5226f53e7870d60436f812e5d9015.tar.gz
lume-f3c8918b13a5226f53e7870d60436f812e5d9015.tar.xz
feat(user): add user-space build system and init process to test fork/wait
Diffstat (limited to 'include/user/user.h')
-rw-r--r--include/user/user.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/user/user.h b/include/user/user.h
new file mode 100644
index 0000000..7ab4923
--- /dev/null
+++ b/include/user/user.h
@@ -0,0 +1,29 @@
+#pragma once
+typedef unsigned long long uint64;
+
+extern "C" {
+ int fork();
+ int exit(int status);
+ int wait(uint64 status_addr);
+ int pipe(int p[]);
+ int write(int fd, const void *buf, int n);
+ int read(int fd, void *buf, int n);
+ int close(int fd);
+ int kill(int pid);
+ int exec(char *, char **);
+ int open(const char *, int);
+ int mknod(const char *, short, short);
+ int unlink(const char *);
+ int fstat(int fd, void *st);
+ int link(const char *, const char *);
+ int mkdir(const char *);
+ int chdir(const char *);
+ int dup(int fd);
+ int getpid();
+ char *sbrk(int n);
+ int sleep(int ticks);
+ int uptime();
+
+
+ void putc(char c);
+} \ No newline at end of file