projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make thread_root() enable interrupts, otherwise kernel threads will
[pintos-anon]
/
src
/
threads
/
thread.c
diff --git
a/src/threads/thread.c
b/src/threads/thread.c
index 5e8a32911bfadb80ebf79e30e294d4222d425edb..636caac22e0733a7df85d8c1861a3eb4b9a1a0ca 100644
(file)
--- a/
src/threads/thread.c
+++ b/
src/threads/thread.c
@@
-30,7
+30,8
@@
static void
thread_root (void (*function) (void *aux), void *aux)
{
ASSERT (function != NULL);
-
+
+ intr_enable ();
function (aux);
thread_exit ();
}
@@
-247,6
+248,7
@@
thread_start (struct thread *t)
list_remove (&t->rq_elem);
t->status = THREAD_RUNNING;
switch_threads (NULL, t);
+ NOT_REACHED ();
}
void