aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/tasks
diff options
context:
space:
mode:
authorMarvin Borner2020-04-28 18:32:36 +0200
committerMarvin Borner2020-04-28 18:32:36 +0200
commit4b8518b4e791c68154ec52badcc921b62afafb49 (patch)
tree9c855266cf7451f503bf3cb849e63ac72ae48e74 /src/kernel/tasks
parent46007d2598b7aef13895b21669cfb6f24272e5fe (diff)
Maaaany fixes...
Sorry for the increasingly worse-getting commit messages :D
Diffstat (limited to 'src/kernel/tasks')
-rw-r--r--src/kernel/tasks/process.c4
-rw-r--r--src/kernel/tasks/process.h2
-rw-r--r--src/kernel/tasks/userspace.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/kernel/tasks/process.c b/src/kernel/tasks/process.c
index 5ac4010..123d2d7 100644
--- a/src/kernel/tasks/process.c
+++ b/src/kernel/tasks/process.c
@@ -21,8 +21,6 @@ void scheduler(struct regs *regs)
{
memcpy(&current_proc->registers, regs, sizeof(struct regs));
- debug("Task switch");
-
timer_handler(regs);
current_proc = current_proc->next;
@@ -30,6 +28,8 @@ void scheduler(struct regs *regs)
current_proc = root;
}
+ debug("Task switch to %s", current_proc->name);
+
while (current_proc->state == PROC_ASLEEP) {
current_proc = current_proc->next;
if (current_proc == NULL)
diff --git a/src/kernel/tasks/process.h b/src/kernel/tasks/process.h
index fc277f4..1a5c607 100644
--- a/src/kernel/tasks/process.h
+++ b/src/kernel/tasks/process.h
@@ -34,6 +34,8 @@ struct process {
struct process *next;
};
+void scheduler(struct regs *regs);
+
void process_kill(uint32_t pid);
uint32_t process_spawn(struct process *process);
diff --git a/src/kernel/tasks/userspace.c b/src/kernel/tasks/userspace.c
index f8d0472..8b88b87 100644
--- a/src/kernel/tasks/userspace.c
+++ b/src/kernel/tasks/userspace.c
@@ -30,6 +30,7 @@ void userspace_enter(struct process *proc)
current_proc = proc;
sti();
+ debug("Jumping to userspace!");
jump_userspace();
}