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)
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;