process.hh (12959:33d9a39e40a3) process.hh (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

--- 232 unchanged lines hidden (view full) ---

241
242typedef std::vector<PendingSensitivity *> PendingSensitivities;
243
244
245class Process : public ::sc_core::sc_object, public ListNode
246{
247 public:
248 virtual ::sc_core::sc_curr_proc_kind procKind() const = 0;
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

--- 232 unchanged lines hidden (view full) ---

241
242typedef std::vector<PendingSensitivity *> PendingSensitivities;
243
244
245class Process : public ::sc_core::sc_object, public ListNode
246{
247 public:
248 virtual ::sc_core::sc_curr_proc_kind procKind() const = 0;
249 bool running() const { return _running; }
249 bool needsStart() const { return _needsStart; }
250 bool dynamic() const { return _dynamic; }
251 bool isUnwinding() const { return _isUnwinding; }
252 bool terminated() const { return _terminated; }
253
254 void forEachKid(const std::function<void(Process *)> &work);
255
256 bool suspended() const { return _suspended; }
257 bool disabled() const { return _disabled; }

--- 35 unchanged lines hidden (view full) ---

293
294 void ready();
295
296 virtual Fiber *fiber() { return Fiber::primaryFiber(); }
297
298 static Process *newest() { return _newest; }
299
300 protected:
250 bool dynamic() const { return _dynamic; }
251 bool isUnwinding() const { return _isUnwinding; }
252 bool terminated() const { return _terminated; }
253
254 void forEachKid(const std::function<void(Process *)> &work);
255
256 bool suspended() const { return _suspended; }
257 bool disabled() const { return _disabled; }

--- 35 unchanged lines hidden (view full) ---

293
294 void ready();
295
296 virtual Fiber *fiber() { return Fiber::primaryFiber(); }
297
298 static Process *newest() { return _newest; }
299
300 protected:
301 Process(const char *name, ProcessFuncWrapper *func, bool _dynamic);
301 Process(const char *name, ProcessFuncWrapper *func, bool _dynamic,
302 bool needs_start);
302
303 static Process *_newest;
304
305 virtual ~Process()
306 {
307 delete func;
308 for (auto s: staticSensitivities)
309 delete s;
310 }
311
312 ::sc_core::sc_event _resetEvent;
313 ::sc_core::sc_event _terminatedEvent;
314
315 ProcessFuncWrapper *func;
316 sc_core::sc_curr_proc_kind _procKind;
303
304 static Process *_newest;
305
306 virtual ~Process()
307 {
308 delete func;
309 for (auto s: staticSensitivities)
310 delete s;
311 }
312
313 ::sc_core::sc_event _resetEvent;
314 ::sc_core::sc_event _terminatedEvent;
315
316 ProcessFuncWrapper *func;
317 sc_core::sc_curr_proc_kind _procKind;
317 bool _running;
318 bool _needsStart;
318 bool _dynamic;
319 bool _isUnwinding;
320 bool _terminated;
321
322 bool _suspended;
323 bool _suspendedReady;
324 bool _disabled;
325

--- 34 unchanged lines hidden ---
319 bool _dynamic;
320 bool _isUnwinding;
321 bool _terminated;
322
323 bool _suspended;
324 bool _suspendedReady;
325 bool _disabled;
326

--- 34 unchanged lines hidden ---