summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols/StateMachine.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-03-18 14:12:01 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-03-18 14:12:01 -0500
commit847ba941ea345f01b2f5176432b6541902a41d2b (patch)
tree0941a91a6d9e643916640c203328bd9d69ee9c38 /src/mem/slicc/symbols/StateMachine.py
parentcc14689a86d4a17bc8d8c77a24539d45e7f78da9 (diff)
downloadgem5-847ba941ea345f01b2f5176432b6541902a41d2b.tar.xz
SLICC: Remove the keyword wake_up_all_dependents
In order to add stall and wait facility for protocols, a keyword wake_up_all_dependents was introduced. This patch removes the keyword, instead this functionality is now implemented as function call.
Diffstat (limited to 'src/mem/slicc/symbols/StateMachine.py')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 3c5f860ea..301e34ea5 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -745,26 +745,28 @@ $c_ident::wakeUpAllBuffers()
std::vector<MsgVecType*> wokeUpMsgVecs;
- for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin();
- buf_iter != m_waiting_buffers.end();
- ++buf_iter) {
- for (MsgVecType::iterator vec_iter = buf_iter->second->begin();
- vec_iter != buf_iter->second->end();
- ++vec_iter) {
- if (*vec_iter != NULL) {
- (*vec_iter)->reanalyzeAllMessages();
- }
- }
- wokeUpMsgVecs.push_back(buf_iter->second);
- }
-
- for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin();
- wb_iter != wokeUpMsgVecs.end();
- ++wb_iter) {
- delete (*wb_iter);
+ if(m_waiting_buffers.size() > 0) {
+ for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin();
+ buf_iter != m_waiting_buffers.end();
+ ++buf_iter) {
+ for (MsgVecType::iterator vec_iter = buf_iter->second->begin();
+ vec_iter != buf_iter->second->end();
+ ++vec_iter) {
+ if (*vec_iter != NULL) {
+ (*vec_iter)->reanalyzeAllMessages();
+ }
+ }
+ wokeUpMsgVecs.push_back(buf_iter->second);
+ }
+
+ for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin();
+ wb_iter != wokeUpMsgVecs.end();
+ ++wb_iter) {
+ delete (*wb_iter);
+ }
+
+ m_waiting_buffers.clear();
}
-
- m_waiting_buffers.clear();
}
void