summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.cc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2015-07-24 12:25:22 -0700
committerBrandon Potter <brandon.potter@amd.com>2015-07-24 12:25:22 -0700
commitb90711ea53f51d85890dd6e1bed0ca852adb8074 (patch)
treeeded5a2ba8f4b283271f1ee4c7deb508f3b42cac /src/sim/syscall_emul.cc
parentef08046af413e2dc19cf7e8e1a3a329cc3c05bec (diff)
downloadgem5-b90711ea53f51d85890dd6e1bed0ca852adb8074.tar.xz
base: refactor process class (specifically FdMap and friends)
This patch extends the previous patch's alterations around fd_map. It cleans up some of the uglier code in the process file and replaces it with a more concise C++11 version. As part of the changes, the FdMap class is pulled out of the Process class and receives its own file.
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 00506125e..4f1cd2a75 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -216,7 +216,7 @@ closeFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
if (sim_fd > 2)
status = close(sim_fd);
if (status >= 0)
- p->free_fdmap_entry(target_fd);
+ p->reset_fd_entry(target_fd);
return status;
}
@@ -597,11 +597,11 @@ dupFunc(SyscallDesc *desc, int num, LiveProcess *process, ThreadContext *tc)
if (sim_fd < 0)
return -EBADF;
- Process::FdMap *fdo = process->sim_fd_obj(tgt_fd);
+ FDEntry *fde = process->get_fd_entry(tgt_fd);
int result = dup(sim_fd);
return (result == -1) ? -errno :
- process->alloc_fd(result, fdo->filename, fdo->flags, fdo->mode, false);
+ process->alloc_fd(result, fde->filename, fde->flags, fde->mode, false);
}