diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-05-05 09:25:59 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-05-05 09:25:59 -0700 |
commit | c65fa3dceb2163967bbb7199013e9fccdc6ff46c (patch) | |
tree | f31fe624e5923d05433fae473512eba6fb39e061 /src/arch/x86/linux | |
parent | 40e180ecbe2e8201c9a0bc9b6676c9f030e95fdd (diff) | |
download | gem5-c65fa3dceb2163967bbb7199013e9fccdc6ff46c.tar.xz |
syscall_emul: fix warn_once behavior
The current ignoreWarnOnceFunc doesn't really work as expected,
since it will only generate one warning total, for whichever
"warn-once" syscall is invoked first. This patch fixes that
behavior by keeping a "warned" flag in the SyscallDesc object,
allowing suitably flagged syscalls to warn exactly once per
syscall.
Diffstat (limited to 'src/arch/x86/linux')
-rw-r--r-- | src/arch/x86/linux/process.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc index 9a2bb96b5..ed17d7388 100644 --- a/src/arch/x86/linux/process.cc +++ b/src/arch/x86/linux/process.cc @@ -231,8 +231,8 @@ static SyscallDesc syscallDescs64[] = { /* 10 */ SyscallDesc("mprotect", ignoreFunc), /* 11 */ SyscallDesc("munmap", munmapFunc), /* 12 */ SyscallDesc("brk", brkFunc), - /* 13 */ SyscallDesc("rt_sigaction", ignoreFunc), - /* 14 */ SyscallDesc("rt_sigprocmask", ignoreFunc), + /* 13 */ SyscallDesc("rt_sigaction", ignoreFunc, SyscallDesc::WarnOnce), + /* 14 */ SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce), /* 15 */ SyscallDesc("rt_sigreturn", unimplementedFunc), /* 16 */ SyscallDesc("ioctl", ioctlFunc<X86Linux64>), /* 17 */ SyscallDesc("pread64", unimplementedFunc), @@ -253,7 +253,7 @@ static SyscallDesc syscallDescs64[] = { /* 32 */ SyscallDesc("dup", dupFunc), /* 33 */ SyscallDesc("dup2", unimplementedFunc), /* 34 */ SyscallDesc("pause", unimplementedFunc), - /* 35 */ SyscallDesc("nanosleep", unimplementedFunc), + /* 35 */ SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce), /* 36 */ SyscallDesc("getitimer", unimplementedFunc), /* 37 */ SyscallDesc("alarm", unimplementedFunc), /* 38 */ SyscallDesc("setitimer", unimplementedFunc), |