scheduler.cc (13209:aad30faa966b) | scheduler.cc (13244:deedec45898f) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 179 unchanged lines hidden (view full) --- 188 if (_stopNow) 189 return; 190 191 if (p->procKind() == ::sc_core::SC_METHOD_PROC_) 192 readyListMethods.pushLast(p); 193 else 194 readyListThreads.pushLast(p); 195 | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 179 unchanged lines hidden (view full) --- 188 if (_stopNow) 189 return; 190 191 if (p->procKind() == ::sc_core::SC_METHOD_PROC_) 192 readyListMethods.pushLast(p); 193 else 194 readyListThreads.pushLast(p); 195 |
196 scheduleReadyEvent(); | 196 if (!inEvaluate()) 197 scheduleReadyEvent(); |
197} 198 199void 200Scheduler::resume(Process *p) 201{ 202 if (initDone) 203 ready(p); 204 else --- 24 unchanged lines hidden (view full) --- 229 } 230 return was_ready; 231} 232 233void 234Scheduler::requestUpdate(Channel *c) 235{ 236 updateList.pushLast(c); | 198} 199 200void 201Scheduler::resume(Process *p) 202{ 203 if (initDone) 204 ready(p); 205 else --- 24 unchanged lines hidden (view full) --- 230 } 231 return was_ready; 232} 233 234void 235Scheduler::requestUpdate(Channel *c) 236{ 237 updateList.pushLast(c); |
237 scheduleReadyEvent(); | 238 if (!inEvaluate()) 239 scheduleReadyEvent(); |
238} 239 240void 241Scheduler::scheduleReadyEvent() 242{ 243 // Schedule the evaluate and update phases. 244 if (!readyEvent.scheduled()) { 245 schedule(&readyEvent); --- 23 unchanged lines hidden (view full) --- 269 yield(); 270 } while (getNextReady()); 271 272 if (!empty) { 273 _numCycles++; 274 _changeStamp++; 275 } 276 | 240} 241 242void 243Scheduler::scheduleReadyEvent() 244{ 245 // Schedule the evaluate and update phases. 246 if (!readyEvent.scheduled()) { 247 schedule(&readyEvent); --- 23 unchanged lines hidden (view full) --- 271 yield(); 272 } while (getNextReady()); 273 274 if (!empty) { 275 _numCycles++; 276 _changeStamp++; 277 } 278 |
277 if (_stopNow) | 279 if (_stopNow) { 280 status(StatusOther); |
278 return; | 281 return; |
282 } |
|
279 280 runUpdate(); 281 runDelta(); 282 283 if (!runToTime && starved()) 284 scheduleStarvationEvent(); 285 286 if (runOnce) --- 186 unchanged lines hidden --- | 283 284 runUpdate(); 285 runDelta(); 286 287 if (!runToTime && starved()) 288 scheduleStarvationEvent(); 289 290 if (runOnce) --- 186 unchanged lines hidden --- |