683c683
< DPRINTF(SimpleCPU, "Fault occured, scheduling fetch event\n");
---
> DPRINTF(SimpleCPU, "Fault occured. Handling the fault\n");
687,688c687,693
< Tick stall = dynamic_pointer_cast<SyscallRetryFault>(fault) ?
< clockEdge(syscallRetryLatency) : clockEdge();
---
> // A syscall fault could suspend this CPU (e.g., futex_wait)
> // If the _status is not Idle, schedule an event to fetch the next
> // instruction after 'stall' ticks.
> // If the cpu has been suspended (i.e., _status == Idle), another
> // cpu will wake this cpu up later.
> if (_status != Idle) {
> DPRINTF(SimpleCPU, "Scheduling fetch event after the Fault\n");
690c695,699
< reschedule(fetchEvent, stall, true);
---
> Tick stall = dynamic_pointer_cast<SyscallRetryFault>(fault) ?
> clockEdge(syscallRetryLatency) : clockEdge();
> reschedule(fetchEvent, stall, true);
> _status = Faulting;
> }
692d700
< _status = Faulting;
696d703
<
701c708
< return;
---
> return;