summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-30 00:39:49 -0700
committerGabe Black <gabeblack@google.com>2018-10-03 00:16:46 +0000
commitf6fda869ead3aae97e73d2222bfc9fdfd837491e (patch)
tree50b3364b03399c03b06c6a04122da327fb744104 /src/systemc/core/scheduler.hh
parent420ab42e02e2a7c0c5aace5b330717cc014bd178 (diff)
downloadgem5-f6fda869ead3aae97e73d2222bfc9fdfd837491e.tar.xz
systemc: Keep track of more cases when we should be ready after resume.
If a thread self suspends, it should be marked as ready after resuming. If a process was already ready when suspended, it should also be remarked as ready after resuming. Special care has to be taken in pre-initialization situations so that processes are put on the right lists, and whether a process is tracked is already marked as ready. Change-Id: I15da7d747db591785358d47781297468c5f9fd09 Reviewed-on: https://gem5-review.googlesource.com/c/12445 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/scheduler.hh')
-rw-r--r--src/systemc/core/scheduler.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index 2da8da470..f55ff1f83 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -182,6 +182,14 @@ class Scheduler
// Put a process on the ready list.
void ready(Process *p);
+ // Mark a process as ready if init is finished, or put it on the list of
+ // processes to be initialized.
+ void resume(Process *p);
+
+ // Remove a process from the ready/init list if it was on one of them, and
+ // return if it was.
+ bool suspend(Process *p);
+
// Schedule an update for a given channel.
void requestUpdate(Channel *c);