summaryrefslogtreecommitdiff
path: root/src/sim/syscall_desc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/syscall_desc.cc')
-rw-r--r--src/sim/syscall_desc.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sim/syscall_desc.cc b/src/sim/syscall_desc.cc
index bb0e80f5f..13b519081 100644
--- a/src/sim/syscall_desc.cc
+++ b/src/sim/syscall_desc.cc
@@ -33,16 +33,21 @@
#include "sim/syscall_desc.hh"
+#include <memory>
+
#include "base/trace.hh"
+#include "base/types.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
+#include "sim/faults.hh"
#include "sim/process.hh"
#include "sim/syscall_debug_macros.hh"
#include "sim/syscall_return.hh"
void
-SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc)
+SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc,
+ Fault *fault)
{
TheISA::IntReg arg[6] M5_VAR_USED;
@@ -71,9 +76,10 @@ SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc)
* blocking behavior, warn that the system call will retry;
* alternatively, print the return value.
*/
- if (retval.needsRetry())
+ if (retval.needsRetry()) {
+ *fault = std::make_shared<SyscallRetryFault>();
DPRINTF_SYSCALL(Base, "%s needs retry\n", _name);
- else
+ } else
DPRINTF_SYSCALL(Base, "%s returns %d\n", _name, retval.encodedValue());
if (!(_flags & SyscallDesc::SuppressReturnValue) && !retval.needsRetry())