fox32os: Don't mark task 0 as unused when yielding for the first time
This commit is contained in:
parent
1da623ce18
commit
3237db9aac
|
@ -84,8 +84,9 @@ draw_startup_text:
|
||||||
|
|
||||||
; when the startup file yields for the first time, we'll end up back here
|
; when the startup file yields for the first time, we'll end up back here
|
||||||
; jump back to it without adding this "task" (not really a task) into the queue
|
; jump back to it without adding this "task" (not really a task) into the queue
|
||||||
|
; end_current_task_no_mark is used specifically because it doesn't mark the current task (still set to 0) as unused
|
||||||
; this does not return
|
; this does not return
|
||||||
call end_current_task
|
call end_current_task_no_mark
|
||||||
|
|
||||||
startup_error:
|
startup_error:
|
||||||
mov r0, BACKGROUND_COLOR
|
mov r0, BACKGROUND_COLOR
|
||||||
|
|
|
@ -43,13 +43,14 @@ yield_task:
|
||||||
; outputs:
|
; outputs:
|
||||||
; none
|
; none
|
||||||
end_current_task:
|
end_current_task:
|
||||||
cmp [task_queue_ptr], task_queue_bottom
|
|
||||||
ifz jmp task_empty
|
|
||||||
|
|
||||||
mov r0, current_task ; get the current task struct
|
mov r0, current_task ; get the current task struct
|
||||||
call task_load
|
call task_load
|
||||||
bcl [task_id_bitmap], r2 ; mark this task ID as unused
|
bcl [task_id_bitmap], r2 ; mark this task ID as unused
|
||||||
|
end_current_task_no_mark:
|
||||||
pop r0 ; pop the return address off of the stack
|
pop r0 ; pop the return address off of the stack
|
||||||
|
|
||||||
|
cmp [task_queue_ptr], task_queue_bottom
|
||||||
|
ifz jmp task_empty
|
||||||
yield_task_0:
|
yield_task_0:
|
||||||
mov r0, task_queue_bottom
|
mov r0, task_queue_bottom
|
||||||
call task_load
|
call task_load
|
||||||
|
|
Loading…
Reference in New Issue
Block a user