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
commitef08046af413e2dc19cf7e8e1a3a329cc3c05bec (patch)
treeeeb29562ef2cd427d1906698882dbd89ef60580b /src/sim/syscall_emul.cc
parent582793468d0fc2f431a1093eb7d5bbf77d7656ae (diff)
downloadgem5-ef08046af413e2dc19cf7e8e1a3a329cc3c05bec.tar.xz
syscall_emul: file descriptor interface changes
This patch gets rid of unused Process::dup_fd method and does minor refactoring in the process class files. The file descriptor max has been changed to be the number of file descriptors since this clarifies the loop boundary condition and cleans up the code a bit. The fd_map field has been altered to be dynamically allocated as opposed to being an array; the intention here is to build on this is subsequent patches to allow processes to share their file descriptors with the clone system call.
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index b1d3edde4..00506125e 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_fd(target_fd);
+ p->free_fdmap_entry(target_fd);
return status;
}