From 2367198921765848a4f5b3d020a7cc5776209f80 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Mon, 27 Feb 2017 14:10:15 -0500 Subject: syscall_emul: [PATCH 15/22] add clone/execve for threading and multiprocess simulations Modifies the clone system call and adds execve system call. Requires allowing processes to steal thread contexts from other processes in the same system object and the ability to detach pieces of process state (such as MemState) to allow dynamic sharing. --- src/mem/page_table.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mem/page_table.cc') diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc index 8ff640837..0abe8eaf3 100644 --- a/src/mem/page_table.cc +++ b/src/mem/page_table.cc @@ -103,6 +103,13 @@ FuncPageTable::remap(Addr vaddr, int64_t size, Addr new_vaddr) } } +void +FuncPageTable::getMappings(std::vector> *addr_maps) +{ + for (auto &iter : pTable) + addr_maps->push_back(make_pair(iter.first, iter.second.pageStart())); +} + void FuncPageTable::unmap(Addr vaddr, int64_t size) { -- cgit v1.2.3