sim-se: Avoid function overloading for syscall implementation
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 2 Dec 2019 12:39:26 +0000 (12:39 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 3 Dec 2019 10:12:02 +0000 (10:12 +0000)
commit7e4967995e4bbcfac877852437c4ab6bf6d70e47
treeae43ca8cca90153afe95c51239d30b6ee8402ab6
parent78e5caef696b017b15447c2a12311e94961cfdb4
sim-se: Avoid function overloading for syscall implementation

This patch is aligning the readlink and access syscalls to the open one,
which is not overloading the openFunc, but it is factoring the
implementation into a openImpl, which is used by both open and openat.

This is needed if passing them to std::function, whose constructor is
not able to handle overloaded functions.

Change-Id: I50a8aacdfd675181b6fe9a2696220ee29cc5bc4b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23260
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/syscall_emul.cc
src/sim/syscall_emul.hh