atomic.cc (3310:21adbb41a37e) | atomic.cc (3324:c75da9e726ff) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 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; --- 87 unchanged lines hidden (view full) --- 96{ 97 panic("AtomicSimpleCPU doesn't expect recvTiming callback!"); 98 return true; 99} 100 101Tick 102AtomicSimpleCPU::CpuPort::recvAtomic(Packet *pkt) 103{ | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 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; --- 87 unchanged lines hidden (view full) --- 96{ 97 panic("AtomicSimpleCPU doesn't expect recvTiming callback!"); 98 return true; 99} 100 101Tick 102AtomicSimpleCPU::CpuPort::recvAtomic(Packet *pkt) 103{ |
104 //Snooping a coherence request, just return | 104 panic("AtomicSimpleCPU doesn't expect recvAtomic callback!"); |
105 return curTick; 106} 107 108void 109AtomicSimpleCPU::CpuPort::recvFunctional(Packet *pkt) 110{ 111 //No internal storage to update, just return 112 return; --- 64 unchanged lines hidden (view full) --- 177 UNSERIALIZE_ENUM(_status); 178 BaseSimpleCPU::unserialize(cp, section); 179 tickEvent.unserialize(cp, csprintf("%s.tickEvent", section)); 180} 181 182void 183AtomicSimpleCPU::resume() 184{ | 105 return curTick; 106} 107 108void 109AtomicSimpleCPU::CpuPort::recvFunctional(Packet *pkt) 110{ 111 //No internal storage to update, just return 112 return; --- 64 unchanged lines hidden (view full) --- 177 UNSERIALIZE_ENUM(_status); 178 BaseSimpleCPU::unserialize(cp, section); 179 tickEvent.unserialize(cp, csprintf("%s.tickEvent", section)); 180} 181 182void 183AtomicSimpleCPU::resume() 184{ |
185 changeState(SimObject::Running); 186 if (thread->status() == ThreadContext::Active) { | 185 if (_status != SwitchedOut && _status != Idle) { |
187 assert(system->getMemoryMode() == System::Atomic); | 186 assert(system->getMemoryMode() == System::Atomic); |
188 if (!tickEvent.scheduled()) 189 tickEvent.schedule(curTick); | 187 188 changeState(SimObject::Running); 189 if (thread->status() == ThreadContext::Active) { 190 if (!tickEvent.scheduled()) 191 tickEvent.schedule(curTick); 192 } |
190 } 191} 192 193void 194AtomicSimpleCPU::switchOut() 195{ 196 assert(status() == Running || status() == Idle); 197 _status = SwitchedOut; --- 389 unchanged lines hidden --- | 193 } 194} 195 196void 197AtomicSimpleCPU::switchOut() 198{ 199 assert(status() == Running || status() == Idle); 200 _status = SwitchedOut; --- 389 unchanged lines hidden --- |