summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-04-21 01:30:05 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-04-21 01:30:05 +0200
commitf275b56a4ef09361dbf3c425bdc22118b55ae898 (patch)
treec10f8cd8ca4a49300b7bf30ae783e55965edc152
parentcd7e689dae440befd8d663d15fff755464709625 (diff)
Fix xen boot
* i386/i386/pcb.c (pcb_init): Make sure there is a thread before calling current_task().
-rw-r--r--i386/i386/pcb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index dd2042d8..743108db 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -409,7 +409,7 @@ void pcb_init(task_t parent_task, thread_t thread)
/* This is a new thread for the current task, make it inherit our FPU
state. */
- if (parent_task == current_task())
+ if (current_thread() && parent_task == current_task())
fpinherit(current_thread(), thread);
}