Commit Graph

3894 Commits

Author SHA1 Message Date
8368dec30b LibC: Fix posix_memalign return value
I was returning -1 with errno instead of the error code :P
2026-07-20 06:58:30 +03:00
7f25350c62 LibC: Fix malloc mmap byte tracking
I was incrementing instead of decrementing when freeing mmap allocs
2026-07-20 06:58:30 +03:00
64523b6c70 LibC: Fix futex return value handling 2026-07-20 06:58:30 +03:00
a9cf0134b7 Kernel: Don't block thread if the wake time has already passed 2026-07-20 06:58:30 +03:00
2e8239fefa Kernel: Fix thread block timeout
I was comparint ms against ns making timeouts practically never wake up
:)
2026-07-20 06:58:30 +03:00
f2bf406db7 ports: Add ccleste port 2026-07-20 06:58:30 +03:00
63a8f40e67 ports/quake2: Clenaup build script and patches 2026-07-20 06:58:30 +03:00
2ddee7016e Kernel: Fix another scheduler bug :^) 2026-07-20 06:58:30 +03:00
bc622c8b51 LibC: Fix pthread default guard size and name 2026-07-20 06:58:30 +03:00
6ebd3a8aca Kernel: Rewrite the AHCI driver
There was a lot of stuff wrong with this driver and it was only getting
speeds of ~2.5 MB/s. Now 4K blocks get ~17 MB/s which is not good but
definitely better. I'm pretty sure the issue is qemu's emulation as 85%
of time is spent between sending the command and it to complete.
Large blocks are now supported too, qemu with block size 1M gets around
600 MB/s read speeds.
2026-07-20 06:58:30 +03:00
96e5779182 Kernel: Fix out of bounds reads on storage devices 2026-07-20 04:07:23 +03:00
02f05436fc Kernel: Fix zero sized reads from a partition 2026-07-20 04:07:23 +03:00
51251e492e Kernel: Fix fallback PS/2 interrupt numbers
I haven't used the fallbacks in so long that I didn't realize they were
wrong :D
2026-07-20 04:07:23 +03:00
20e36125c8 Kernel: Cleanup very old AHCI code 2026-07-20 04:07:23 +03:00
19c228362b Kernel: Make ext2 block buffers page aligned 2026-07-20 04:07:23 +03:00
cf9a495f1d ports: Add ClassiCube port 2026-07-20 04:07:23 +03:00
5329ec5912 Kernel: Rework spinlock usage when blocking the current thread
The old SpinLockAsMutex was pretty confusing first of all. It also was
causing the issue thats been around for maybe a year now which is the
only consistently happening kernel panic. I've been pretty confused
about this and finally figured out what was causing this.

The main issue was that we were accidentally enabling interrupts when
blocking a thread that passed SpinLockAsMutex from normally interrupt
enabled context. This led to receiving IPI for thread unblock while
we were actively blocking the thread. I'm very suprized this had't
caused any more serious issues than occasional kernel panics :^)
2026-07-20 04:07:23 +03:00
edc95e1c09 Kernel: Disable SMP message handling while blocking a thread
There were some race conditions on a thread getting unblocked before
being moved to the block queue
2026-07-20 04:07:23 +03:00
46e2d665e9 LibC: Make pthread_once block with a futex instead of yielding 2026-07-20 04:07:23 +03:00
0242a4f968 DynamicLoader: Fix master and initial TLS setup 2026-07-20 04:07:23 +03:00
390a7674b1 LibC: Fix uthread deallocation
Update dtv[0] to the max loadad module when loading dynamic modules

Free uthread if stack allocation or mprotect fails on pthread_create

Don't unmap the currently used stack when detached thread exits
2026-07-20 04:07:23 +03:00
f96f2b4cac ports: Split dejavu fonts to their own port 2026-07-20 04:07:23 +03:00
51b9dcebbc Kernel: Support FIONBIO ioctl 2026-07-20 04:07:23 +03:00
583c2437b4 LibC: Don't munmap nullptr with 0 size in malloc 2026-07-20 04:07:23 +03:00
efb25e5666 BAN/LibC: Move ldexp, scalbn to libc
They are now implemented with float decompostion to modify the exponent
bits directly
2026-07-20 04:07:23 +03:00
f0e95ffe48 LibC: Make qsort_swap static
There is no need to export this
2026-07-20 04:07:23 +03:00
511ab7e99c LibC: Define locale_t as an poiter
A lot of ports seem to depend on this casting nullptr into locale_t
2026-07-20 04:07:23 +03:00
4df58c5155 Kernel: Check for overflow in seek syscall 2026-07-20 04:07:23 +03:00
f6e27e5f05 toolchain: Update gcc 15.2.0->15.3.0
There was an ICE bug in gcc 15.2.x when compiling webkitgtk
2026-07-20 04:07:23 +03:00
87006e277f LibC: Define winsize in both termios.h and sys/ioctl.h 2026-07-20 04:07:23 +03:00
2c340c5532 BAN: Implement more numerically stable hypot 2026-07-20 04:07:23 +03:00
f6b91578ae LibC: Enable backtrace dumping by default
I'm not sure why I had turned this off
2026-07-20 04:07:23 +03:00
73a95bd725 ports/lynx: Update 2.9.2->2.9.3 and fix compilation 2026-07-20 04:07:23 +03:00
130c4f681c ports/ncurses: Enable widec support and disable test compilation
There is one test with buggy macros that does not compile and im not
feeling like making a patch for it now :^)
2026-07-20 04:07:23 +03:00
e03a26cf01 LibC: Don't ASSERT in times
Return the current process CPU time as user time. We don't have a way to
get system/user time separation or CPU times of child processes
2026-07-20 04:07:23 +03:00
2a3eca5b36 LibC: Implement POSIX binary search trees
I used RB tree for this. The implementation is based on the code on
wikipedia about RB trees.
2026-07-20 04:07:23 +03:00
658e74b507 bootloader: Check that VESA mode is linear
I don't think there are any graphical non-linear framebuffers but good
to be sure
2026-07-20 04:07:23 +03:00
9bdf60bb88 bootloader: Fix stack corruption when pressing non ascii keys 2026-07-20 04:07:23 +03:00
3148c28c3d userspace: Add basic find utility
This is mostly working but is missing -exec and -ok support. It can
search files though :^)
2026-07-08 21:48:14 +03:00
fa89645542 userspace: Implement simple sort utility
This supports most(?) options except for the separate fields. Should
work for simple use cases

Also merge is currently just a wrapper around sort so its not optimized
:D
2026-07-08 21:48:14 +03:00
ddf8fbc085 BuildSystem: Use ccache if found 2026-07-08 21:48:14 +03:00
ecfd98fad0 bootloader: Don't use random packing in memory map 2026-07-08 21:48:14 +03:00
2e9f7077c9 TaskBar: Fix division by zero error
If a CPU does not have updated stats to show, just display ??.??%
2026-07-07 17:50:00 +03:00
132b75c2d0 ports/bash: Fix compilation with moved winsize 2026-07-07 16:59:20 +03:00
bc8f0f373e ports: Add tar port 2026-07-07 16:59:20 +03:00
e352bfbb23 mkdir: Don't fail the target exists and -p was given 2026-07-07 16:59:20 +03:00
3ee6240806 Kernel: Prioritize EEXISTS sys_mkdir
This fixes `mkdir -p ...` failing to create existing parents which are
not writable
2026-07-07 16:59:20 +03:00
304f94f3b1 LibC: Implement __fpending
Some gnu programs want this and I don't want to make FILE non-opaque
2026-07-07 16:59:20 +03:00
89fa957297 BuildSystem: Fix keymap in base sysroot 2026-07-07 16:59:20 +03:00
7348511ed3 ports/llvm: Add support for pthread_setname_np and cpu count
Also package the llvm into the format mesa expects. This was kinda
tedious to always do manually
2026-07-07 10:30:07 +03:00