work on shared memory accross threads
This commit is contained in:
parent
0b2fd79816
commit
8ee9f1d7da
1 changed files with 111 additions and 56 deletions
|
|
@ -97,10 +97,18 @@ impl<'a> Elf<'a> {
|
|||
|
||||
memory.remap(flags, true);
|
||||
|
||||
context.image.push(memory);
|
||||
context.image.push(memory.to_shared());
|
||||
}
|
||||
}
|
||||
|
||||
context.heap = Some(context::memory::Memory::new(
|
||||
VirtualAddress::new(arch::USER_HEAP_OFFSET),
|
||||
0,
|
||||
entry::NO_EXECUTE | entry::WRITABLE | entry::USER_ACCESSIBLE,
|
||||
true,
|
||||
true
|
||||
).to_shared());
|
||||
|
||||
// Map stack
|
||||
context.stack = Some(context::memory::Memory::new(
|
||||
VirtualAddress::new(arch::USER_STACK_OFFSET),
|
||||
|
|
|
|||
Loading…
Reference in a new issue