summaryrefslogtreecommitdiff
path: root/src/arch/x86/linux
diff options
context:
space:
mode:
authorBrandon Potter <Brandon.Potter@amd.com>2017-03-01 13:35:02 -0600
committerBrandon Potter <Brandon.Potter@amd.com>2017-03-09 22:42:45 +0000
commit198c515b970604df600c2b84ddfc51fa24ed9754 (patch)
tree93d8ea360017d53a2b192f8822f454f80e2ec9c4 /src/arch/x86/linux
parentacce7b0dc0edf85b99c75d1800df99bd9e288b01 (diff)
downloadgem5-198c515b970604df600c2b84ddfc51fa24ed9754.tar.xz
syscall-emul: Add or extend dup, dup2, and pipe
This changeset extends the pipe system call to work with architectures other than Alpha (and enables the syscall for x86). For the dup system call, it sets the clone-on-exec flag by default. For the dup2 system call, the changeset adds an implementation (and enables it for x86). Change-Id: I00ddb416744ee7dd61a5cd02c4c3d97f30543878 Reviewed-on: https://gem5-review.googlesource.com/2266 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com>
Diffstat (limited to 'src/arch/x86/linux')
-rw-r--r--src/arch/x86/linux/process.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index f90022bdd..aad5151f6 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -242,7 +242,7 @@ static SyscallDesc syscallDescs64[] = {
/* 19 */ SyscallDesc("readv", unimplementedFunc),
/* 20 */ SyscallDesc("writev", writevFunc<X86Linux64>),
/* 21 */ SyscallDesc("access", ignoreFunc),
- /* 22 */ SyscallDesc("pipe", unimplementedFunc),
+ /* 22 */ SyscallDesc("pipe", pipeFunc),
/* 23 */ SyscallDesc("select", unimplementedFunc),
/* 24 */ SyscallDesc("sched_yield", unimplementedFunc),
/* 25 */ SyscallDesc("mremap", mremapFunc<X86Linux64>),
@@ -253,7 +253,7 @@ static SyscallDesc syscallDescs64[] = {
/* 30 */ SyscallDesc("shmat", unimplementedFunc),
/* 31 */ SyscallDesc("shmctl", unimplementedFunc),
/* 32 */ SyscallDesc("dup", dupFunc),
- /* 33 */ SyscallDesc("dup2", unimplementedFunc),
+ /* 33 */ SyscallDesc("dup2", dup2Func),
/* 34 */ SyscallDesc("pause", unimplementedFunc),
/* 35 */ SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce),
/* 36 */ SyscallDesc("getitimer", unimplementedFunc),
@@ -591,7 +591,7 @@ static SyscallDesc syscallDescs32[] = {
/* 39 */ SyscallDesc("mkdir", unimplementedFunc),
/* 40 */ SyscallDesc("rmdir", unimplementedFunc),
/* 41 */ SyscallDesc("dup", dupFunc),
- /* 42 */ SyscallDesc("pipe", unimplementedFunc),
+ /* 42 */ SyscallDesc("pipe", pipeFunc),
/* 43 */ SyscallDesc("times", timesFunc<X86Linux32>),
/* 44 */ SyscallDesc("prof", unimplementedFunc),
/* 45 */ SyscallDesc("brk", brkFunc),
@@ -612,7 +612,7 @@ static SyscallDesc syscallDescs32[] = {
/* 60 */ SyscallDesc("umask", unimplementedFunc),
/* 61 */ SyscallDesc("chroot", unimplementedFunc),
/* 62 */ SyscallDesc("ustat", unimplementedFunc),
- /* 63 */ SyscallDesc("dup2", unimplementedFunc),
+ /* 63 */ SyscallDesc("dup2", dup2Func),
/* 64 */ SyscallDesc("getppid", unimplementedFunc),
/* 65 */ SyscallDesc("getpgrp", unimplementedFunc),
/* 66 */ SyscallDesc("setsid", unimplementedFunc),