Fix sf9 to ignore slot 0

It used to read uninitialized data at SLOT_BASE[0].

git-svn-id: svn://kolibrios.org@9964 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2024-01-14 19:34:21 +00:00
parent 259bd4349f
commit 0572b0fbf6
3 changed files with 9 additions and 4 deletions

View File

@@ -2432,6 +2432,8 @@ sys_cpuusage:
.no_who_am_i:
cmp ecx, max_processes
ja .nofillbuf
test ecx, ecx ; slot 0 is empty, kernel threads start from 1
jz .nofillbuf
; +4: word: position of the window of thread in the window stack
mov ax, [WIN_STACK + ecx * 2]