]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: extract x86 GDT/GS TLS setup from scheduler to HAL layer
authorTulio A M Mendes <[email protected]>
Thu, 12 Feb 2026 06:42:19 +0000 (03:42 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commit9c8d64004c5417ecc7ccffe0c8d1f637faed6fce
tree42df67f8506c46c2c4b83637020697d49cbe4f30
parentf7dc0d93e37c0bdae9f6fba9a1b8e42684431732
refactor: extract x86 GDT/GS TLS setup from scheduler to HAL layer

Added hal_cpu_set_tls(base) to the HAL CPU API with x86 implementation
(GDT entry 22 + GS segment load) and a no-op fallback for other arches.

kernel/scheduler.c no longer contains x86 inline assembly for TLS —
the #if defined(__i386__) block is replaced by a single HAL call.
include/hal/cpu.h
src/hal/x86/cpu.c
src/kernel/scheduler.c