Add is_task_id_used
This commit is contained in:
parent
0439b67d14
commit
cf627052ff
|
@ -12,6 +12,7 @@ yield_task: jmp [0x00000A14]
|
||||||
end_current_task: jmp [0x00000A18]
|
end_current_task: jmp [0x00000A18]
|
||||||
get_current_task_id: jmp [0x00000A1C]
|
get_current_task_id: jmp [0x00000A1C]
|
||||||
get_unused_task_id: jmp [0x00000A20]
|
get_unused_task_id: jmp [0x00000A20]
|
||||||
|
is_task_id_used: jmp [0x00000A24]
|
||||||
|
|
||||||
; memory jump table
|
; memory jump table
|
||||||
allocate_memory: jmp [0x00000B10]
|
allocate_memory: jmp [0x00000B10]
|
||||||
|
|
|
@ -28,6 +28,7 @@ jump_table:
|
||||||
data.32 end_current_task
|
data.32 end_current_task
|
||||||
data.32 get_current_task_id
|
data.32 get_current_task_id
|
||||||
data.32 get_unused_task_id
|
data.32 get_unused_task_id
|
||||||
|
data.32 is_task_id_used
|
||||||
|
|
||||||
; memory jump table
|
; memory jump table
|
||||||
org.pad 0x00000B10
|
org.pad 0x00000B10
|
||||||
|
|
|
@ -133,6 +133,15 @@ get_current_task_id:
|
||||||
pop r2
|
pop r2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
; check if a task ID is used
|
||||||
|
; inputs:
|
||||||
|
; r0: task ID
|
||||||
|
; outputs:
|
||||||
|
; Z flag: set if unused, reset if used
|
||||||
|
is_task_id_used:
|
||||||
|
bts [task_id_bitmap], r0
|
||||||
|
ret
|
||||||
|
|
||||||
task_load:
|
task_load:
|
||||||
mov r2, [r0] ; task ID
|
mov r2, [r0] ; task ID
|
||||||
add r0, 4
|
add r0, 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user