summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.cc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-03-17 10:24:17 -0700
committerBrandon Potter <brandon.potter@amd.com>2016-03-17 10:24:17 -0700
commita04fac976f02377237bb827d46854b669ebc2397 (patch)
tree2f2a5e55e16b2c05e4d94e302081bb977e864a36 /src/sim/syscall_emul.cc
parent3fa311e5acd58ce720014dd964728c2fa414ca6a (diff)
downloadgem5-a04fac976f02377237bb827d46854b669ebc2397.tar.xz
syscall_emul: extend mmap system call to support file backed mmaps
For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected.
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 517580d79..392658c5a 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -324,7 +324,9 @@ _llseekFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
SyscallReturn
munmapFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
{
- // given that we don't really implement mmap, munmap is really easy
+ // With mmap more fully implemented, it might be worthwhile to bite
+ // the bullet and implement munmap. Should allow us to reuse simulated
+ // memory.
return 0;
}