atomic.cc (6023:47b4fcb10c11) | atomic.cc (6043:19852407f5c9) |
---|---|
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; --- 257 unchanged lines hidden (view full) --- 266void 267AtomicSimpleCPU::suspendContext(int thread_num) 268{ 269 DPRINTF(SimpleCPU, "SuspendContext %d\n", thread_num); 270 271 assert(thread_num == 0); 272 assert(thread); 273 | 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; --- 257 unchanged lines hidden (view full) --- 266void 267AtomicSimpleCPU::suspendContext(int thread_num) 268{ 269 DPRINTF(SimpleCPU, "SuspendContext %d\n", thread_num); 270 271 assert(thread_num == 0); 272 assert(thread); 273 |
274 if (_status == Idle) 275 return; 276 |
|
274 assert(_status == Running); 275 276 // tick event may not be scheduled if this gets called from inside 277 // an instruction's execution, e.g. "quiesce" 278 if (tickEvent.scheduled()) 279 deschedule(tickEvent); 280 281 notIdleFraction--; --- 438 unchanged lines hidden --- | 277 assert(_status == Running); 278 279 // tick event may not be scheduled if this gets called from inside 280 // an instruction's execution, e.g. "quiesce" 281 if (tickEvent.scheduled()) 282 deschedule(tickEvent); 283 284 notIdleFraction--; --- 438 unchanged lines hidden --- |