add memory barriers to seralize load and store operations

=> required to clone a task
This commit is contained in:
Stefan Lankes 2012-07-16 23:05:46 +02:00
parent 837bc3ebe1
commit 6013c2ec4d

View file

@ -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));