]> git.corax.cc Git - corax/commitdiff
kernel/arch: Fix task_lock() and task_unlock() functions
authorMatthias Kruk <m@m10k.eu>
Sat, 21 Mar 2020 17:12:25 +0000 (02:12 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 21 Mar 2020 17:12:25 +0000 (02:12 +0900)
kernel/arch/task.S

index f05f64bc935297aa2784eb5d7d22e784035f5e85..fe62d54011399c2afdf9d530515786b3b6fde915 100644 (file)
@@ -489,15 +489,19 @@ task_move_stack:
 4:     ret
 
 task_lock:
-       addl    $OFFSET_TASK_LOCK, 4(%esp)
+       movl    4(%esp), %eax
+       addl    $OFFSET_TASK_LOCK, %eax
+       pushl   %eax
        call    spinlock_lock
-       subl    $OFFSET_TASK_LOCK, 4(%esp)
+       addl    $4, %esp
        ret
 
 task_unlock:
-       addl    $OFFSET_TASK_LOCK, 4(%esp)
+       movl    4(%esp), %eax
+       addl    $OFFSET_TASK_LOCK, %eax
+       pushl   %eax
        call    spinlock_unlock
-       subl    $OFFSET_TASK_LOCK, 4(%esp)
+       addl    $4, %esp
        ret
 
        /*