Commit Graph

24 Commits

Author SHA1 Message Date
Bananymous d4d530e6c8 Kernel: Implement basic shared memory objects
These can allocate memory that can be shared between processes using
a global key. There is currenly no safety checks meaning anyone can
map any shared memory object just by trying to map every possible key.
2024-05-29 15:58:46 +03:00
Bananymous c18d926174 LibC: Fix timeval field name 2024-02-14 03:36:18 +02:00
Bananymous 3fc1edede0 Kernel/LibC: Implement super basic select
This does not really even block but it works... :D
2024-02-12 17:26:33 +02:00
Bananymous 454bee3f02 LibC: Fix sockaddr_un implementation 2024-02-07 15:57:45 +02:00
Bananymous 41cad88d6e Kernel/LibC: Implement dummy syscalls for accept, connect, listen 2024-02-07 15:57:45 +02:00
Bananymous 0f154c3173 Kernel: Implement basic recvfrom 2024-02-02 13:50:00 +02:00
Bananymous ec2f21bb9f Kernel/LibC: Implement SYS_SENDTO 2024-02-02 03:16:01 +02:00
Bananymous ab150b458a Kernel/LibC: Implement basic socket binding 2024-02-02 01:31:58 +02:00
Bananymous cf28ecd5a6 Kernel/LibC: Add SYS_SOCKET 2024-02-01 23:39:09 +02:00
Bananymous dfe5a2d665 All: Cleanup all files
Add newline to end of files and remove whitespace from end of lines
2024-01-24 15:53:38 +02:00
Bananymous 51214ea1bf Kernel: Add load_keymap syscall and load Finnish keymap in init 2024-01-10 14:46:29 +02:00
Bananymous 60e755210c Kernel/LibC: Implement very basic msync 2023-11-22 22:44:06 +02:00
Bananymous 6ee4d10651 Kernel/LibC/Userspace: Implement mkdir and creat
Touch now uses creat insteadd of open with O_CREAT flag
2023-10-25 21:07:26 +03:00
Bananymous 627b8cc140 Kernel/LibC: implement chmod syscall + libc wrapper 2023-10-25 02:35:37 +03:00
Bananymous 23f429e23b LibC: Fix mmap()
mmap() did not pass fildes to the syscall structure.
2023-09-29 17:24:21 +03:00
Bananymous 48096b18c2 LibC: mmap returns MAP_FAILED instead of NULL 2023-09-29 10:38:08 +03:00
Bananymous 6eda65eea6 Kernel/LibC/Userspace: Add SYS_POWEROFF + cli tool
You can now shutdown/reboot banan-os with the poweroff cli tool.

Reboot doesn't seem to work on qemu.
2023-09-28 12:36:47 +03:00
Bananymous cb76f1ea75 Kernel: Add some functionality to disable TTY input/output
Userspace programs can call tty_ctrl() to disable/enable tty from
handling input and displaying output.

This API is probably going to change in the future to ioctl calls
but I'm not sure how ioctl is used and what functionality should it
have. I decided to create whole new function and syscall for now.

Next I will expose framebuffer in /dev/fb0 and then I can start work
on graphical environment! :D
2023-09-27 15:44:05 +03:00
Bananymous af4af1cae9 Kernel/LibC: add mmap for private anonymous mappings
This will be used by the userspace to get more memory. Currently
kernel handles all allocations, which is not preferable.
2023-09-22 23:01:14 +03:00
Bananymous 39a5c52088 Kernel: Fix directory permissions
We did not care about X bit in directories and instead used only the
R bit for search/read.
2023-09-08 11:46:53 +03:00
Bananymous 9ab7e76a3b LibC: cleanup fstatat 2023-08-11 12:25:15 +03:00
Bananymous aa86125f2b Kernel: Implement SYS_FSTAT 2023-06-11 03:29:22 +03:00
Bananymous d1ad38c8d4 Kernel/LibC: add SYS_STAT and stat(), lstat() 2023-06-05 14:37:14 +03:00
Bananymous 40055f023c 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