From 3e34278b3f0ad9f2e471ef009339d898d44e74ab Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 7 Dec 2019 18:14:11 -0800 Subject: [PATCH] sim: Remove the get*PseudoFunc handlers. These were used in Alpha which has been removed. Change-Id: I801ef71972b0c3d2aa04d682a3a94acfb27ac7ed Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23449 Reviewed-by: Bobby R. Bruce Maintainer: Gabe Black Tested-by: kokoro --- src/sim/syscall_emul.cc | 31 ------------------------------- src/sim/syscall_emul.hh | 10 ---------- 2 files changed, 41 deletions(-) diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 913a26591..4ab472aaf 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -969,37 +969,6 @@ setpgidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc, return 0; } -SyscallReturn -getpidPseudoFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) -{ - // Make up a PID. There's no interprocess communication in - // fake_syscall mode, so there's no way for a process to know it's - // not getting a unique value. - - auto process = tc->getProcessPtr(); - return SyscallReturn(process->pid(), process->ppid()); -} - - -SyscallReturn -getuidPseudoFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) -{ - // Make up a UID and EUID... it shouldn't matter, and we want the - // simulation to be deterministic. - - auto process = tc->getProcessPtr(); - return SyscallReturn(process->uid(), process->euid()); -} - - -SyscallReturn -getgidPseudoFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) -{ - // Get current group ID. - auto process = tc->getProcessPtr(); - return SyscallReturn(process->gid(), process->egid()); -} - SyscallReturn getpidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 2fd5fa7e5..6be574ac8 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -503,20 +503,10 @@ futexFunc(SyscallDesc *desc, int callnum, ThreadContext *tc, return -ENOSYS; } - /// Pseudo Funcs - These functions use a different return convension, /// returning a second value in a register other than the normal return register SyscallReturn pipePseudoFunc(SyscallDesc *desc, int num, ThreadContext *tc); -/// Target getpidPseudo() handler. -SyscallReturn getpidPseudoFunc(SyscallDesc *desc, int num, ThreadContext *tc); - -/// Target getuidPseudo() handler. -SyscallReturn getuidPseudoFunc(SyscallDesc *desc, int num, ThreadContext *tc); - -/// Target getgidPseudo() handler. -SyscallReturn getgidPseudoFunc(SyscallDesc *desc, int num, ThreadContext *tc); - /// A readable name for 1,000,000, for converting microseconds to seconds. const int one_million = 1000000; -- 2.30.2