From 6013c2ec4d0bf36ef346626e3242bbde0e774a89 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 16 Jul 2012 23:05:46 +0200 Subject: [PATCH] add memory barriers to seralize load and store operations => required to clone a task --- arch/x86/kernel/gdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/gdt.c b/arch/x86/kernel/gdt.c index 5861a978..384d9cb8 100644 --- a/arch/x86/kernel/gdt.c +++ b/arch/x86/kernel/gdt.c @@ -67,7 +67,9 @@ int arch_fork(task_t* task) id = task->id; // copy kernel stack of the current task + mb(); memcpy(kstacks[id], kstacks[curr_task->id], KERNEL_STACK_SIZE); + mb(); #ifdef CONFIG_X86_32 asm volatile ("mov %%esp, %0" : "=r"(esp));