banan-os/kernel/arch/i686
Bananymous 4af9699b22 Kernel: Only save/load sse state when it is used
There is no need to save and load sse state on every interrupt. Instead
we can use CR0.TS to make threads trigger an interrupt when they use sse
instructions. This can be used to only save and load sse state when
needed.

Processor now keeps track of its current "sse thread" and the scheduler
either enabled or disabled sse based on which thread it is starting up.
When a thread dies, it checks if it was the current sse thread to avoid
use after free bugs. When load balancing, processor has to save the
thread's sse state before sending it to a new processor (if it was the
current sse thread). This ensures thread's sse state will be correct
when the new processor ends up loading it.
2026-01-11 03:06:39 +02:00
..
PageTable.cpp Kernel: Only send one smp message when reserving a range 2025-08-07 16:43:05 +03:00
Signal.S Kernel: Remove unused (and broken) code from signal trampoline 2025-12-28 03:53:38 +02:00
Syscall.S Kernel: Fix 32 bit target compile and runtime 2026-01-09 17:06:57 +02:00
Thread.S Kernel: Only save/load sse state when it is used 2026-01-11 03:06:39 +02:00
Yield.S Kernel: optimize yielding 2026-01-11 01:31:09 +02:00
boot.S Kernel: Add syscall-less clock_gettime 2026-01-08 17:13:59 +02:00
crti.S Kernel: Cleanup constructor calls 2024-08-31 02:23:08 +03:00
crtn.S Kernel: Cleanup constructor calls 2024-08-31 02:23:08 +03:00
interrupts.S Kernel: optimize yielding 2026-01-11 01:31:09 +02:00
linker.ld Kernel: Cleanup constructor calls 2024-08-31 02:23:08 +03:00