StateMachine.py (8086:bf0335d98250) | StateMachine.py (8154:f3d1493787d4) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 731 unchanged lines hidden (view full) --- 740$c_ident::wakeUpAllBuffers() 741{ 742 // 743 // Wake up all possible buffers that could be waiting on any message. 744 // 745 746 std::vector<MsgVecType*> wokeUpMsgVecs; 747 | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 731 unchanged lines hidden (view full) --- 740$c_ident::wakeUpAllBuffers() 741{ 742 // 743 // Wake up all possible buffers that could be waiting on any message. 744 // 745 746 std::vector<MsgVecType*> wokeUpMsgVecs; 747 |
748 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 749 buf_iter != m_waiting_buffers.end(); 750 ++buf_iter) { 751 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 752 vec_iter != buf_iter->second->end(); 753 ++vec_iter) { 754 if (*vec_iter != NULL) { 755 (*vec_iter)->reanalyzeAllMessages(); 756 } 757 } 758 wokeUpMsgVecs.push_back(buf_iter->second); | 748 if(m_waiting_buffers.size() > 0) { 749 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 750 buf_iter != m_waiting_buffers.end(); 751 ++buf_iter) { 752 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 753 vec_iter != buf_iter->second->end(); 754 ++vec_iter) { 755 if (*vec_iter != NULL) { 756 (*vec_iter)->reanalyzeAllMessages(); 757 } 758 } 759 wokeUpMsgVecs.push_back(buf_iter->second); 760 } 761 762 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 763 wb_iter != wokeUpMsgVecs.end(); 764 ++wb_iter) { 765 delete (*wb_iter); 766 } 767 768 m_waiting_buffers.clear(); |
759 } | 769 } |
760 761 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 762 wb_iter != wokeUpMsgVecs.end(); 763 ++wb_iter) { 764 delete (*wb_iter); 765 } 766 767 m_waiting_buffers.clear(); | |
768} 769 770void 771$c_ident::blockOnQueue(Address addr, MessageBuffer* port) 772{ 773 m_is_blocking = true; 774 m_block_map[addr] = port; 775} --- 860 unchanged lines hidden --- | 770} 771 772void 773$c_ident::blockOnQueue(Address addr, MessageBuffer* port) 774{ 775 m_is_blocking = true; 776 m_block_map[addr] = port; 777} --- 860 unchanged lines hidden --- |