process.cc (12959:33d9a39e40a3) | process.cc (12961:9bd3a469fd11) |
---|---|
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 --- 263 unchanged lines hidden (view full) --- 272 s = nullptr; 273 } 274 pendingStaticSensitivities.clear(); 275}; 276 277void 278Process::run() 279{ | 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 --- 263 unchanged lines hidden (view full) --- 272 s = nullptr; 273 } 274 pendingStaticSensitivities.clear(); 275}; 276 277void 278Process::run() 279{ |
280 _running = true; | |
281 bool reset; 282 do { 283 reset = false; 284 try { 285 func->call(); 286 } catch(::sc_core::sc_unwind_exception exc) { 287 reset = exc.is_reset(); 288 } 289 } while (reset); | 280 bool reset; 281 do { 282 reset = false; 283 try { 284 func->call(); 285 } catch(::sc_core::sc_unwind_exception exc) { 286 reset = exc.is_reset(); 287 } 288 } while (reset); |
290 _running = false; | 289 _terminated = true; |
291} 292 293void 294Process::addStatic(PendingSensitivity *s) 295{ 296 pendingStaticSensitivities.push_back(s); 297} 298 --- 19 unchanged lines hidden (view full) --- 318Process::ready() 319{ 320 if (suspended()) 321 _suspendedReady = true; 322 else 323 scheduler.ready(this); 324} 325 | 290} 291 292void 293Process::addStatic(PendingSensitivity *s) 294{ 295 pendingStaticSensitivities.push_back(s); 296} 297 --- 19 unchanged lines hidden (view full) --- 317Process::ready() 318{ 319 if (suspended()) 320 _suspendedReady = true; 321 else 322 scheduler.ready(this); 323} 324 |
326Process::Process(const char *name, ProcessFuncWrapper *func, bool _dynamic) : | 325Process::Process(const char *name, ProcessFuncWrapper *func, 326 bool _dynamic, bool needs_start) : |
327 ::sc_core::sc_object(name), excWrapper(nullptr), func(func), | 327 ::sc_core::sc_object(name), excWrapper(nullptr), func(func), |
328 _running(false), _dynamic(_dynamic), _isUnwinding(false), | 328 _needsStart(needs_start), _dynamic(_dynamic), _isUnwinding(false), |
329 _terminated(false), _suspended(false), _disabled(false), 330 _syncReset(false), refCount(0), stackSize(::Fiber::DefaultStackSize), 331 dynamicSensitivity(nullptr) 332{ 333 _newest = this; 334 if (_dynamic) 335 finalize(); 336 else --- 12 unchanged lines hidden --- | 329 _terminated(false), _suspended(false), _disabled(false), 330 _syncReset(false), refCount(0), stackSize(::Fiber::DefaultStackSize), 331 dynamicSensitivity(nullptr) 332{ 333 _newest = this; 334 if (_dynamic) 335 finalize(); 336 else --- 12 unchanged lines hidden --- |