diff options
author | Alec Roelke <ar4jc@virginia.edu> | 2017-11-06 22:04:11 -0500 |
---|---|---|
committer | Alec Roelke <ar4jc@virginia.edu> | 2017-11-22 01:05:18 +0000 |
commit | a01d53078a583ea71b845243785c44376c084c4b (patch) | |
tree | ad21c6aae427dfe40ff5f790d89b15523bc60b9c /src/sim | |
parent | 83f2da1ca84e21c1ca0855ffc24b1d8c48fed2c8 (diff) | |
download | gem5-a01d53078a583ea71b845243785c44376c084c4b.tar.xz |
sim-se: Add default to SyscallDesc constructor
This patch adds a default value of unimplementedFunc to SyscallDesc's
constructor's second argument, which makes adding system call
placeholders to SE mode cleaner.
Change-Id: I3e7efb3a887cc52d16d2095d3dd2e2a96fb882fb
Reviewed-on: https://gem5-review.googlesource.com/5501
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/syscall_desc.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sim/syscall_desc.hh b/src/sim/syscall_desc.hh index d72803e43..451db084b 100644 --- a/src/sim/syscall_desc.hh +++ b/src/sim/syscall_desc.hh @@ -51,9 +51,13 @@ #include "base/types.hh" class Process; +class SyscallDesc; class SyscallReturn; class ThreadContext; +SyscallReturn unimplementedFunc(SyscallDesc *desc, int num, + Process *p, ThreadContext *tc); + /** * This class provides the wrapper interface for the system call * implementations which are defined in the sim/syscall_emul files and @@ -66,7 +70,8 @@ class SyscallDesc { typedef SyscallReturn (*SyscallExecutor)(SyscallDesc*, int num, Process*, ThreadContext*); - SyscallDesc(const char *name, SyscallExecutor sys_exec, int flags = 0) + SyscallDesc(const char *name, + SyscallExecutor sys_exec=unimplementedFunc, int flags=0) : _name(name), executor(sys_exec), _flags(flags), _warned(false) { } |