summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 61a2d5b0..959208ab 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -28,15 +28,7 @@
#include <machine/cpu.h>
#include <machine/tcb.h>
-/*
- * Per processor run queue.
- */
-struct thread_runq {
- struct thread *current;
- struct list threads;
-} __aligned(CPU_L1_SIZE);
-
-static struct thread_runq thread_runqs[MAX_CPUS];
+struct thread_runq thread_runqs[MAX_CPUS];
/*
* Caches for allocated threads and their stacks.
@@ -72,12 +64,6 @@ thread_runq_dequeue(struct thread_runq *runq)
return thread;
}
-static inline struct thread_runq *
-thread_runq_local(void)
-{
- return &thread_runqs[cpu_id()];
-}
-
void __init
thread_setup(void)
{
@@ -138,6 +124,7 @@ thread_create(struct thread **threadp, const char *name, struct task *task,
name = task->name;
thread->flags = 0;
+ thread->preempt = 0;
thread->task = task;
thread->stack = stack;
strlcpy(thread->name, name, sizeof(thread->name));