aboutsummaryrefslogtreecommitdiff
path: root/src/sys/schedule.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-18 16:02:08 -0700
committerChristian Cunningham <cc@localhost>2022-03-18 16:02:08 -0700
commit1fbbb6f15fef8e958b57728d59d1912aeea7c7c6 (patch)
tree9d009183e882f3a85393e2356bccaeb96ed6db92 /src/sys/schedule.c
parent8b4a126ccca0694161bc3d0731f8b5c1ec66e5c8 (diff)
Supervisor Call to Add Thread
Diffstat (limited to 'src/sys/schedule.c')
-rw-r--r--src/sys/schedule.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sys/schedule.c b/src/sys/schedule.c
index 00935c9..c3c549f 100644
--- a/src/sys/schedule.c
+++ b/src/sys/schedule.c
@@ -250,7 +250,7 @@ unsigned char add_thread_without_duplicate(void* pc, void* arg, unsigned char pr
return 1;
}
-unsigned char add_thread(void* pc, void* arg, unsigned char priority)
+unsigned char svc_add_thread(void* pc, void* arg, unsigned char priority)
{
struct Entry* thread_entry = get_unused_thread();
// The only point-of-failure is not having a thread available
@@ -283,11 +283,6 @@ unsigned char add_thread(void* pc, void* arg, unsigned char priority)
thread->preempt = 0;
/// Add Thread to Scheduler
push_thread_to_queue(thread, THREAD_READY, thread->priority);
- // Schedule if this was called in usermode
- unsigned long mode = getmode() & 0x1F;
- if (mode == 0x10) {
- sys0(SYS_YIELD_HIGH);
- }
return 0;
}