summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-24 17:19:39 -0700
committerGabe Black <gabeblack@google.com>2018-09-26 00:01:37 +0000
commite95a3062415a27ddd8183fa3a621aba6198b1621 (patch)
tree3be905f68408a70949fa8947620986432df1373a /src
parentccd671c4891e79bbb2359089ffa494e06254b0af (diff)
downloadgem5-e95a3062415a27ddd8183fa3a621aba6198b1621.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/systemc/core/process_types.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemc/core/process_types.hh b/src/systemc/core/process_types.hh
index 7617d41ef..2dde4672a 100644
--- a/src/systemc/core/process_types.hh
+++ b/src/systemc/core/process_types.hh
@@ -94,6 +94,7 @@ class Thread : public Process
thread->_needsStart = false;
thread->run();
thread->terminate();
+ scheduler.yield();
}
};
friend class Context;