Kernel: Start working on TLS, add SYS_{SET,GET}_TLS

This commit is contained in:
2025-04-15 23:16:20 +03:00
parent 254fd80088
commit 4bcd3ed86f
11 changed files with 60 additions and 3 deletions

View File

@@ -41,11 +41,15 @@ start_userspace_thread:
call get_thread_start_sp
movl %eax, %esp
# ds, es = user data
movw $(0x20 | 3), %bx
movw %bx, %ds
movw %bx, %es
movw %bx, %fs
# gs = thread local
movw $(0x30 | 3), %bx
movw %bx, %gs
# fs = 0
xorw %bx, %bx
movw %bx, %fs
iret