sim-se: change syscall function signature
authorBrandon Potter <brandon.potter@amd.com>
Tue, 28 Aug 2018 14:13:04 +0000 (10:13 -0400)
committerBrandon Potter <Brandon.Potter@amd.com>
Tue, 21 May 2019 20:42:38 +0000 (20:42 +0000)
commitdd8a7694806e3f816ba688d2094106db68b46b53
tree8fc6bcc3e474ae3843779f6d019b296e28a8848b
parentdd2d44547ddc08ccee9e1465104eff2f43efdec0
sim-se: change syscall function signature

The system calls had four parameters. One of the parameters
is ThreadContext and another is Process. The ThreadContext
holds the value of the current process so the Process parameter
is redundant since the system call functions already have
indirect access.

With the old API, it is possible to call into the functions with
the wrong supplied Process which could end up being a confusing
error.

This patch removes the redundancy by forcing access through the
ThreadContext field within each system call.

Change-Id: Ib43d3f65824f6d425260dfd9f67de1892b6e8b7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12299
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
17 files changed:
src/arch/alpha/linux/process.cc
src/arch/arm/freebsd/process.cc
src/arch/arm/linux/process.cc
src/arch/mips/linux/process.cc
src/arch/power/linux/process.cc
src/arch/riscv/linux/process.cc
src/arch/sparc/linux/syscalls.cc
src/arch/sparc/solaris/process.cc
src/arch/x86/linux/process.cc
src/gpu-compute/cl_driver.cc
src/gpu-compute/cl_driver.hh
src/sim/emul_driver.hh
src/sim/process.cc
src/sim/syscall_desc.cc
src/sim/syscall_desc.hh
src/sim/syscall_emul.cc
src/sim/syscall_emul.hh