5fae3cec2a
Kernel: Implement SYS_SYNC and add sync executable to userspace
...
You can (and have to) manually sync disk after writes to it.
2023-09-11 01:26:27 +03:00
720bc418a6
All: Clear lines with only whitspace in them
2023-09-10 00:31:42 +03:00
97ea4986af
Kernel/LibC: implement proper getpgid and setpgid
2023-08-22 14:53:12 +03:00
42b90ae76c
Kernel/LibC: Add {get,set}pgrp()
2023-08-22 11:36:33 +03:00
8e4216215e
Kernel/LibC: add dup() syscall and function
2023-08-17 12:03:29 +03:00
8ec6d4c9fc
LibC: we don't parse syscall arguments in unistd
...
We just call Kernel::syscall() with 5 arguments from the variadic function.
This was a necessary addition since the syscall() function
used over 2 KiB of stack space.
2023-07-31 22:24:11 +03:00
432c296b7b
Kernel: Implement SYS_GET_PID and SYS_TCSETPGID
...
we don't have consept of process groups yet
2023-07-24 22:29:59 +03:00
adb14ba373
Kernel: Userspace signal handlers are now called one at a time
...
I added a syscall for telling the kernel when signal execution has
finished. We should send a random hash or id to the signal trampoline
that we would include in the syscall, so validity of signal exit can
be confirmed.
2023-07-23 13:34:53 +03:00
7391d91317
Kernel/LibC: add SYS_SIGNAL/signal()
2023-07-21 20:08:13 +03:00
ad756c36fc
Kernel/LibC: Add SYS_KILL/kill()
2023-07-21 19:27:38 +03:00
dcd4d0daeb
Kernel/LibC: Add bareboness signals
...
You can now call raise() to raise a signal. Signal handlers are
not yet supported, but the handling works :)
2023-07-21 15:45:02 +03:00
4972284dde
Kernel: open() and openat() now take mode as parameter
...
O_CREAT now tries to create file if O_CREAT is specified
2023-07-10 15:08:54 +03:00
a549336530
Kernel/LibC: add basic dup2
2023-07-06 23:17:54 +03:00
4eb95c963d
Kernel/LibC: Add basic pipe() syscall and command
...
You can now create pipes :)
2023-07-06 22:16:26 +03:00
22caacd2a9
LibC: add read() and write() to unistd
2023-07-06 22:15:55 +03:00
3c068aa0ae
Kernel/LibC: add clock_gettime() for CLOCK_MONOTONIC
...
This gets the number of milliseconds since boot
2023-07-06 00:38:29 +03:00
d99e704728
LibC: Fix syscall SYS_READ and SYS_WRITE arguments
2023-06-19 10:38:29 +03:00
0f63cfa43f
Kernel/LibC: add SYS_{SET,GET}_PWD and chdir, getpwd
2023-06-12 02:02:52 +03:00
b254ade69b
Kernel: Add SYS_GET_{,E}{UID,GID}
2023-06-11 22:37:00 +03:00
ef4ebaa969
Kernel: Add syscalls for set{,e,re}{uid,gid}
2023-06-11 22:37:00 +03:00
51eb44bf40
Kernel/Userspace: Add basic init process
...
This process parses /etc/passwd and promps login screen.
When an username is entered, it will launch that users shell
2023-06-11 22:37:00 +03:00
8be28012ee
LibC: Reorder some syscalls
2023-06-11 03:29:22 +03:00
f0b22c48b2
LibC: implement close
2023-06-11 03:29:22 +03:00
52c4eebd77
Kernel: Implement SYS_FSTAT
2023-06-11 03:29:22 +03:00
7a5d5cabad
Kernel: Add syscall for reading directory entries
2023-06-11 00:18:08 +03:00
86f58f60cb
LibC: implement setenv, unsetenv, putenv
2023-06-05 22:51:02 +03:00
064ce568c2
Kernel: add basic support for environment variables
...
exec functions will search files from PATH
2023-06-05 22:51:02 +03:00
b0e9ab0519
Kernel/LibC: pass environ pointer to process
2023-06-05 21:12:08 +03:00
9d64dbd5c2
Kernel/LibC: add SYS_STAT and stat(), lstat()
2023-06-05 14:37:14 +03:00
cbb9f47ee5
LibC: add wait and waitpid
...
Note that wait() doesn't work since only waiting for specified
pid is supported. wait() will just return -1 and set errno to
ECHILD.
2023-06-04 18:00:52 +03:00
3c3c7826ef
LibC: Add simple definition for realloc
...
The syscall just crashes the kernel currently. I will implement
this when needed
2023-06-02 17:56:13 +03:00
0acab11620
LibC: add execl
2023-05-31 22:36:26 +03:00
ab61b49aca
Kernel: Add SYS_EXEC syscall
2023-05-31 20:57:33 +03:00
7151bb86a8
Kernel/LibC: opening standard files is done in libc
2023-05-29 20:21:19 +03:00
0c316ebfb2
Kernel: Add SYS_SLEEP
2023-05-28 22:34:48 +03:00
6fdbe6f9c2
Kernel: Add bareboness fork() function
2023-05-28 18:08:49 +03:00
f79250c4d4
LibC: Rewrite all the headers.
...
We now have more or less posix issue 2018 conforming libc headers.
This was a really time consuming and boring operation but it had to
be done.
Now we get to actually start implementing libc :)
2023-05-26 22:31:21 +03:00
9e0abbc2f0
Kernel: Add bareboness possibility to set termios
2023-05-26 22:31:21 +03:00
4a4a3bf184
Kernel/LibC: move file offset back to kernel
...
This makes keeping track of offsets easier and more proper
2023-05-26 22:31:21 +03:00
1cf7ef3de6
Kernel: Remove offset from OpenFileDescriptor
...
This is now handled on the libc side. There might be reasons to
have it in kernel side, but for simplicity's sake I'm moving it
to libc for now :)
2023-05-09 20:31:22 +03:00
10d9b72da1
LibC: syscall() now returns -1 on error and updates errno
2023-05-07 01:51:39 +03:00
2fe9af7165
Kernel/LibC: add free function for FixedWidthAllocator
...
I have to rework the syscall API and allocators in process. For
now this works well enough :)
2023-05-07 01:21:50 +03:00
ff5bcd4416
Kernel: Add basic fixed width allocator for userspace
...
We have to move process stacks to the general heap and maybe map
kernel to higher half.
2023-05-06 19:58:08 +03:00
7b19d6e479
LibC: fread() now does a single syscall
2023-04-25 12:38:08 +03:00
1b4c744974
LibC: syscalls have now proper argument order
2023-04-22 15:29:15 +03:00
fe87c08a02
LibC: add needed stubs to build executables with our compiler
2023-04-12 17:53:02 +03:00
e760bafeeb
LibC: add stubs for a lot of functions
2023-04-05 23:58:40 +03:00