gem5
v20.1.0.0
|
This class provides the wrapper interface for the system call implementations which are defined in the sim/syscall_emul files and bound to the ISAs in the architecture specific code (i.e. More...
#include <syscall_desc.hh>
Public Member Functions | |
void | doSyscall (ThreadContext *tc) |
Interface for invoking the system call funcion pointer. More... | |
std::string | name () const |
int | num () const |
virtual void | returnInto (ThreadContext *tc, const SyscallReturn &ret)=0 |
For use within the system call executor if new threads are created and need something returned into them. More... | |
Protected Types | |
using | Executor = std::function< SyscallReturn(SyscallDesc *, ThreadContext *)> |
using | Dumper = std::function< std::string(std::string, ThreadContext *)> |
Protected Member Functions | |
SyscallDesc (int num, const char *name, Executor exec, Dumper dump) | |
Private Attributes | |
std::string | _name |
System call name (e.g., open, mmap, clone, socket, etc.) More... | |
int | _num |
Executor | executor |
Mechanism for ISAs to connect to the emul function definitions. More... | |
Dumper | dumper |
This class provides the wrapper interface for the system call implementations which are defined in the sim/syscall_emul files and bound to the ISAs in the architecture specific code (i.e.
arch/X86/linux/process.cc).
Definition at line 66 of file syscall_desc.hh.
|
protected |
Definition at line 88 of file syscall_desc.hh.
|
protected |
Definition at line 87 of file syscall_desc.hh.
Definition at line 90 of file syscall_desc.hh.
void SyscallDesc::doSyscall | ( | ThreadContext * | tc | ) |
Interface for invoking the system call funcion pointer.
Note that this acts as a gateway for all system calls and serves a good point to add filters for behaviors or apply checks for all system calls.
tc | Handle for owning ThreadContext to pass information |
Definition at line 38 of file syscall_desc.cc.
References DPRINTF_SYSCALL, dumper, SyscallReturn::encodedValue(), executor, name(), SyscallReturn::needsRetry(), and SyscallReturn::suppressed().
Referenced by PowerLinuxProcess::syscall(), SparcISA::SparcSolarisProcess::syscall(), MipsLinuxProcess::syscall(), RiscvLinuxProcess64::syscall(), SparcISA::Sparc32LinuxProcess::syscall(), RiscvLinuxProcess32::syscall(), SparcISA::Sparc64LinuxProcess::syscall(), ArmLinuxProcess32::syscall(), and ArmLinuxProcess64::syscall().
|
inline |
Definition at line 76 of file syscall_desc.hh.
References _name.
Referenced by SyscallDescABI< ABI >::buildDumper(), doSyscall(), ignoreFunc(), ignoreWarnOnceFunc(), openatFunc(), setThreadArea32Func(), and unimplementedFunc().
|
inline |
|
pure virtual |
For use within the system call executor if new threads are created and need something returned into them.
Implemented in SyscallDescABI< ABI >.
Referenced by cloneFunc().
|
private |
System call name (e.g., open, mmap, clone, socket, etc.)
Definition at line 96 of file syscall_desc.hh.
Referenced by name().
|
private |
Definition at line 97 of file syscall_desc.hh.
Referenced by num().
|
private |
Definition at line 101 of file syscall_desc.hh.
Referenced by doSyscall().
|
private |
Mechanism for ISAs to connect to the emul function definitions.
Definition at line 100 of file syscall_desc.hh.
Referenced by doSyscall().