banan-os/kernel
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
..
arch Kernel: Only save/load sse state when it is used 2026-01-11 03:06:39 +02:00
font BuildSystem: building for 32-bit works now 2023-04-02 05:03:17 +03:00
include/kernel Kernel: Only save/load sse state when it is used 2026-01-11 03:06:39 +02:00
kernel Kernel: Only save/load sse state when it is used 2026-01-11 03:06:39 +02:00
klibc LibC: Define ESHUTDOWN 2025-11-02 21:09:48 +02:00
CMakeLists.txt Kernel: optimize yielding 2026-01-11 01:31:09 +02:00
icxxabi.cpp Kernel: Fix cxxabi for function static variable guards 2024-07-14 01:53:50 +03:00
ubsan.cpp Kenrel: Add __builtin_unreachable support for UBSAN 2024-09-22 17:14:36 +03:00