diff options
Diffstat (limited to 'xen-2.4.16/arch/i386/process.c')
-rw-r--r-- | xen-2.4.16/arch/i386/process.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xen-2.4.16/arch/i386/process.c b/xen-2.4.16/arch/i386/process.c index c8e81de675..a23f4b1557 100644 --- a/xen-2.4.16/arch/i386/process.c +++ b/xen-2.4.16/arch/i386/process.c @@ -12,8 +12,6 @@ */ #define __KERNEL_SYSCALLS__ -#include <stdarg.h> - #include <xeno/config.h> #include <xeno/lib.h> #include <xeno/errno.h> @@ -326,6 +324,9 @@ void new_thread(struct task_struct *p, __save_flags(regs->eflags); regs->eflags |= X86_EFLAGS_IF; + + /* No fast trap at start of day. */ + SET_DEFAULT_FAST_TRAP(&p->thread); } @@ -363,12 +364,17 @@ void new_thread(struct task_struct *p, /* NB. prev_p passed in %eax, next_p passed in %edx */ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) { + extern struct desc_struct idt_table[]; struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; struct tss_struct *tss = init_tss + smp_processor_id(); unlazy_fpu(prev_p); + /* Switch the fast-trap handler. */ + CLEAR_FAST_TRAP(&prev_p->thread); + SET_FAST_TRAP(&next_p->thread); + tss->esp0 = next->esp0; tss->esp1 = next->esp1; tss->ss1 = next->ss1; |