systemc: When a thread completes, yield to the scheduler.

Don't just fall off the end of the fiber and return to gem5. By
calling yield, we ensure that remaining Processes are run and that
bookkeeping is maintained correctly.

Change-Id: Ifbe104e155cad29e40a89767a7c1f986399f784d
Reviewed-on: https://gem5-review.googlesource.com/12264
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-08-24 17:19:39 -07:00
parent ccd671c489
commit e95a306241

View File

@@ -94,6 +94,7 @@ class Thread : public Process
thread->_needsStart = false;
thread->run();
thread->terminate();
scheduler.yield();
}
};
friend class Context;