[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 7/8] kernel2: STATUS_RUNNING korrekt setzen



! kernel2: Wenn der aktive Task wechselt, muss auch der Status entsprechend
  aktualisiert werden.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/kernel2/src/arch/i386/vm86.c |    1 +
 src/kernel2/src/syscalls/rpc.c   |    4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/kernel2/src/arch/i386/vm86.c b/src/kernel2/src/arch/i386/vm86.c
index b4cbd05..7418203 100644
--- a/src/kernel2/src/arch/i386/vm86.c
+++ b/src/kernel2/src/arch/i386/vm86.c
@@ -160,6 +160,7 @@ static int create_vm86_task(int intr, vm86_regs_t* regs, uintptr_t stack)
     // waehrenddessen nicht in den Scheduler zurueckgegeben und gestoppt.
     current_thread->status = PM_STATUS_BLOCKED;
     current_thread = task;
+    task->status = PM_STATUS_RUNNING;
 
     return 0;
 }
diff --git a/src/kernel2/src/syscalls/rpc.c b/src/kernel2/src/syscalls/rpc.c
index e0ebd34..114fe1d 100644
--- a/src/kernel2/src/syscalls/rpc.c
+++ b/src/kernel2/src/syscalls/rpc.c
@@ -291,9 +291,7 @@ int do_fastrpc(pid_t callee_pid, size_t metadata_size, void* metadata,
     }
 
     // Zum aufgerufenen Task wechseln
-    pm_scheduler_push(current_thread);
-    pm_scheduler_get(callee);
-    current_thread = callee;
+    pm_scheduler_try_switch(callee);
 
     return 0;
 
-- 
1.6.0.2