summaryrefslogtreecommitdiff
path: root/kernel/source/application.asm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/source/application.asm')
-rw-r--r--kernel/source/application.asm11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/source/application.asm b/kernel/source/application.asm
index ed8b190..632822f 100644
--- a/kernel/source/application.asm
+++ b/kernel/source/application.asm
@@ -137,9 +137,12 @@ resume_thread:
extern copy_syscall_stack
;rdi = bottom
+;returns: pointer to copy
-global save_thread_state
-save_thread_state:
+extern resume_next_thread
+
+global yield
+yield:
;rdi = pointer to cpu state structure
;only saving registers that need to be preserved by this function
@@ -163,9 +166,7 @@ save_thread_state:
mov qword [rdi + 152], rax ;kernel_stack_copy
mov byte [rdi + 160], 0x01 ;in_syscall
- xor al, al
- ret
+ jmp resume_next_thread
.resume_to:
- mov al, 0x01
ret