SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_thread_process.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 /*****************************************************************************
21 
22  sc_thread_process.h -- Thread process declarations
23 */
35 #if !defined(sc_thread_process_h_INCLUDED)
36 #define sc_thread_process_h_INCLUDED
37 
39 #include "sysc/kernel/sc_process.h"
40 #include "sysc/kernel/sc_cor.h"
41 #include "sysc/kernel/sc_event.h"
42 #include "sysc/kernel/sc_except.h"
43 #include "sysc/kernel/sc_reset.h"
44 
45 // DEBUGGING MACROS:
46 //
47 // DEBUG_MSG(NAME,P,MSG)
48 // MSG = message to print
49 // NAME = name that must match the process for the message to print, or
50 // null if the message should be printed unconditionally.
51 // P = pointer to process message is for, or NULL in which case the
52 // message will not print.
53 #if 0
54 # include <cstring>
55 # define DEBUG_NAME ""
56 # define DEBUG_MSG(NAME,P,MSG) \
57  { \
58  if ( P && ( (std::strlen(NAME)==0) || !std::strcmp(NAME,P->name())) ) \
59  std::cout << "**** " << sc_time_stamp() << " (" \
60  << sc_get_current_process_name("** NONE **") << "): " << MSG \
61  << " - " << P->name() << std::endl; \
62  }
63 #else
64 # define DEBUG_MSG(NAME,P,MSG)
65 #endif
66 
67 
68 namespace sc_core {
69 
70 // forward references:
71 class sc_event_and_list;
72 class sc_event_or_list;
73 class sc_reset;
74 void sc_thread_cor_fn( void* );
75 SC_API void sc_set_stack_size( sc_thread_handle, std::size_t );
76 class sc_event;
77 class sc_join;
78 class sc_module;
79 class sc_process_handle;
80 class sc_process_table;
81 class sc_simcontext;
82 class sc_runnable;
83 
84 sc_cor* get_cor_pointer( sc_process_b* process_p );
85 SC_API void sc_set_stack_size( sc_thread_handle thread_h, std::size_t size );
86 SC_API void wait( sc_simcontext* );
87 SC_API void wait( const sc_event&, sc_simcontext* );
88 SC_API void wait( const sc_event_or_list&, sc_simcontext* );
89 SC_API void wait( const sc_event_and_list&, sc_simcontext* );
90 SC_API void wait( const sc_time&, sc_simcontext* );
91 SC_API void wait( const sc_time&, const sc_event&, sc_simcontext* );
92 SC_API void wait( const sc_time&, const sc_event_or_list&, sc_simcontext* );
93 SC_API void wait( const sc_time&, const sc_event_and_list&, sc_simcontext* );
94 
95 //==============================================================================
96 // sc_thread_process -
97 //
98 //==============================================================================
100  friend void sc_thread_cor_fn( void* );
101  friend void sc_set_stack_size( sc_thread_handle, std::size_t );
102  friend class sc_event;
103  friend class sc_join;
104  friend class sc_module;
105  friend class sc_process_b;
106  friend class sc_process_handle;
107  friend class sc_process_table;
108  friend class sc_simcontext;
109  friend class sc_runnable;
110  friend sc_cor* get_cor_pointer( sc_process_b* process_p );
111 
112  friend void wait( sc_simcontext* );
113  friend void wait( const sc_event&, sc_simcontext* );
114  friend void wait( const sc_event_or_list&, sc_simcontext* );
115  friend void wait( const sc_event_and_list&, sc_simcontext* );
116  friend void wait( const sc_time&, sc_simcontext* );
117  friend void wait( const sc_time&, const sc_event&, sc_simcontext* );
118  friend void wait( const sc_time&, const sc_event_or_list&, sc_simcontext* );
119  friend void wait( const sc_time&, const sc_event_and_list&, sc_simcontext*);
120  public:
121  sc_thread_process( const char* name_p, bool free_host,
122  SC_ENTRY_FUNC method_p, sc_process_host* host_p,
123  const sc_spawn_options* opt_p );
124 
125  virtual const char* kind() const
126  { return "sc_thread_process"; }
127 
128  protected:
129  // may not be deleted manually (called from sc_process_b)
130  virtual ~sc_thread_process();
131 
132  virtual void disable_process(
134  virtual void enable_process(
136  virtual void kill_process(
140  virtual void prepare_for_simulation();
141  virtual void resume_process(
143  void set_next_exist( sc_thread_handle next_p );
144  void set_next_runnable( sc_thread_handle next_p );
145 
146  void set_stack_size( std::size_t size );
147  inline void suspend_me();
148  virtual void suspend_process(
150  virtual void throw_reset( bool async );
151  virtual void throw_user( const sc_throw_it_helper& helper,
153 
154  bool trigger_dynamic( sc_event* );
155  inline void trigger_static();
156 
157  void wait( const sc_event& );
158  void wait( const sc_event_or_list& );
159  void wait( const sc_event_and_list& );
160  void wait( const sc_time& );
161  void wait( const sc_time&, const sc_event& );
162  void wait( const sc_time&, const sc_event_or_list& );
163  void wait( const sc_time&, const sc_event_and_list& );
164  void wait_cycles( int n=1 );
165 
166  protected:
167  void add_monitor( sc_process_monitor* monitor_p );
168  void remove_monitor( sc_process_monitor* monitor_p);
169  void signal_monitors( int type = 0 );
170 
171  protected:
172  sc_cor* m_cor_p; // Thread's coroutine.
173  std::vector<sc_process_monitor*> m_monitor_q; // Thread monitors.
174  std::size_t m_stack_size; // Thread stack size.
175  int m_wait_cycle_n; // # of waits to be done.
176 
177  private: // disabled
179  const sc_thread_process& operator = ( const sc_thread_process& );
180 
181 };
182 
183 //------------------------------------------------------------------------------
184 //"sc_thread_process::set_stack_size"
185 //
186 //------------------------------------------------------------------------------
187 inline void sc_thread_process::set_stack_size( std::size_t size )
188 {
189  sc_assert( size );
190  m_stack_size = size;
191 }
192 
193 //------------------------------------------------------------------------------
194 //"sc_thread_process::suspend_me"
195 //
196 // This method suspends this object instance in favor of the next runnable
197 // process. Upon awakening we check to see if an exception should be thrown.
198 // There are two types of exceptions that can be thrown, synchronous reset
199 // and asynchronous reset. At a future time there may be more asynchronous
200 // exceptions. If an asynchronous reset is seen and there is not static reset
201 // specified, or the static reset is not active then clear the throw
202 // type for the next time this method is called.
203 //
204 // Notes:
205 // (1) For an explanation of how the reset mechanism works see the top of
206 // the file sc_reset.cpp.
207 // (2) The m_sticky_reset field is used to handle synchronous resets that
208 // are enabled via the sc_process_handle::sync_reset_on() method. These
209 // resets are not generated by a signal, but rather are modal by
210 // method call: sync_reset_on() - sync_reset_off().
211 //------------------------------------------------------------------------------
213 {
214  // remember, if we're currently unwinding
215  bool unwinding_preempted = m_unwinding;
216 
217  sc_simcontext* simc_p = simcontext();
218  sc_cor* cor_p = simc_p->next_cor();
219 
220  // do not switch, if we're about to execute next (e.g. suicide)
221 
222  if( m_cor_p != cor_p )
223  {
224  DEBUG_MSG( DEBUG_NAME , this, "suspending thread");
225  simc_p->cor_pkg()->yield( cor_p );
226  DEBUG_MSG( DEBUG_NAME , this, "resuming thread");
227  }
228 
229  // IF THERE IS A THROW TO BE DONE FOR THIS PROCESS DO IT NOW:
230  //
231  // (1) Optimize THROW_NONE for speed as it is the normal case.
232  // (2) If this thread is already unwinding then suspend_me() was
233  // called from the catch clause to throw an exception on another
234  // process, so just go back to the catch clause.
235 
236  if ( m_throw_status == THROW_NONE ) return;
237 
238  if ( m_unwinding ) return;
239 
240  switch( m_throw_status )
241  {
242  case THROW_ASYNC_RESET:
243  case THROW_SYNC_RESET:
244  DEBUG_MSG( DEBUG_NAME , this, "throwing reset for");
246  throw sc_unwind_exception( this, true );
247 
248  case THROW_USER:
249  DEBUG_MSG( DEBUG_NAME, this, "invoking throw_it for");
252  THROW_NONE);
254  break;
255 
256  case THROW_KILL:
257  DEBUG_MSG( DEBUG_NAME, this, "throwing kill for");
258  throw sc_unwind_exception( this, false );
259 
260  default: // THROWING_NOW
261  if( !unwinding_preempted )
263  , "unexpected unwinding/throw status" );
264  // may continue, if suppressed
266  DEBUG_MSG( DEBUG_NAME, this, "restarting thread");
267  break;
268  }
269 }
270 
271 
272 //------------------------------------------------------------------------------
273 //"sc_thread_process::wait"
274 //
275 //------------------------------------------------------------------------------
276 inline
277 void
279 {
280  if( m_unwinding )
281  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
282 
283  m_event_p = &e; // for cleanup.
284  e.add_dynamic( this );
286  suspend_me();
287 }
288 
289 inline
290 void
292 {
293  if( m_unwinding )
294  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
295 
296  el.add_dynamic( this );
297  m_event_list_p = &el;
299  suspend_me();
300 }
301 
302 inline
303 void
305 {
306  if( m_unwinding )
307  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
308 
309  el.add_dynamic( this );
310  m_event_list_p = &el;
311  m_event_count = el.size();
313  suspend_me();
314 }
315 
316 inline
317 void
319 {
320  if( m_unwinding )
321  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
322 
323  m_timeout_event_p->notify_internal( t );
324  m_timeout_event_p->add_dynamic( this );
326  suspend_me();
327 }
328 
329 inline
330 void
332 {
333  if( m_unwinding )
334  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
335 
336  m_timeout_event_p->notify_internal( t );
337  m_timeout_event_p->add_dynamic( this );
338  e.add_dynamic( this );
339  m_event_p = &e;
341  suspend_me();
342 }
343 
344 inline
345 void
347 {
348  if( m_unwinding )
349  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
350 
351  m_timeout_event_p->notify_internal( t );
352  m_timeout_event_p->add_dynamic( this );
353  el.add_dynamic( this );
354  m_event_list_p = &el;
356  suspend_me();
357 }
358 
359 inline
360 void
362 {
363  if( m_unwinding )
364  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
365 
366  m_timeout_event_p->notify_internal( t );
367  m_timeout_event_p->add_dynamic( this );
368  el.add_dynamic( this );
369  m_event_list_p = &el;
370  m_event_count = el.size();
372  suspend_me();
373 }
374 
375 //------------------------------------------------------------------------------
376 //"sc_thread_process::wait_cycles"
377 //
378 // This method suspends this object instance for the specified number of cycles.
379 // A cycle is defined as the event the thread is set up to staticly wait on.
380 // The field m_wait_cycle_n is set to one less than the number of cycles to
381 // be waited for, since the value is tested before being decremented in
382 // the simulation kernel.
383 //------------------------------------------------------------------------------
384 inline
385 void
387 {
388  if( m_unwinding )
389  SC_REPORT_ERROR( SC_ID_WAIT_DURING_UNWINDING_, name() );
390 
391  m_wait_cycle_n = n-1;
392  suspend_me();
393 }
394 
395 //------------------------------------------------------------------------------
396 //"sc_thread_process::miscellaneous support"
397 //
398 //------------------------------------------------------------------------------
399 inline
401 {
402  m_monitor_q.push_back(monitor_p);
403 }
404 
405 
406 inline
408 {
409  int mon_n = m_monitor_q.size();
410 
411  for ( int mon_i = 0; mon_i < mon_n; mon_i++ )
412  {
413  if ( m_monitor_q[mon_i] == monitor_p )
414  {
415  m_monitor_q[mon_i] = m_monitor_q[mon_n-1];
416  m_monitor_q.resize(mon_n-1);
417  }
418  }
419 }
420 
421 inline
423 {
424  m_exist_p = next_p;
425 }
426 
427 inline
429 {
430  return (sc_thread_handle)m_exist_p;
431 }
432 
433 inline
435 {
436  m_runnable_p = next_p;
437 }
438 
439 inline
441 {
443 }
444 
445 inline sc_cor* get_cor_pointer( sc_process_b* process_p )
446 {
447  sc_thread_handle thread_p = dynamic_cast<sc_thread_handle>(process_p);
448  return thread_p->m_cor_p;
449 }
450 
451 //------------------------------------------------------------------------------
452 //"sc_thread_process::trigger_static"
453 //
454 // This inline method adds the current thread to the queue of runnable
455 // processes if required. This is the case if the following criteria
456 // are met:
457 // (1) The process is in a runnable state.
458 // (2) The process is not already on the run queue.
459 // (3) The process is expecting a static trigger,
460 // dynamic event waits take priority.
461 // (4) The process' static wait count is zero.
462 //
463 // If the triggering process is the same process, the trigger is
464 // ignored as well, unless SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS
465 // is defined.
466 //------------------------------------------------------------------------------
467 inline
468 void
470 {
471  // No need to try queueing this thread if one of the following is true:
472  // (a) it is disabled
473  // (b) it is already queued for execution
474  // (c) it is waiting on a dynamic event
475  // (d) its wait count is not satisfied
476 
477  if ( (m_state & ps_bit_disabled) || is_runnable() ||
479  return;
480 
481 #if ! defined( SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS )
482  if( SC_UNLIKELY_( sc_get_current_process_b() == this ) )
483  {
485  return;
486  }
487 #endif // SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS
488 
489  if ( m_wait_cycle_n > 0 )
490  {
491  --m_wait_cycle_n;
492  return;
493  }
494 
495  // If we get here, then the thread has satisfied its wait criteria. If it is
496  // suspended, then mark its state as ready to run. If it is not suspended,
497  // then push it onto the runnable queue.
498 
499  if ( m_state & ps_bit_suspended )
500  {
502  }
503  else
504  {
505  simcontext()->push_runnable_thread(this);
506  }
507 }
508 
509 #undef DEBUG_MSG
510 #undef DEBUG_NAME
511 
512 } // namespace sc_core
513 
514 // $Log: sc_thread_process.h,v $
515 // Revision 1.30 2011/08/26 20:46:11 acg
516 // Andy Goodrich: moved the modification log to the end of the file to
517 // eliminate source line number skew when check-ins are done.
518 //
519 // Revision 1.29 2011/08/24 23:36:12 acg
520 // Andy Goodrich: removed break statements that can never be reached and
521 // which causes warnings in the Greenhills C++ compiler.
522 //
523 // Revision 1.28 2011/04/14 22:34:27 acg
524 // Andy Goodrich: removed dead code.
525 //
526 // Revision 1.27 2011/04/13 05:02:18 acg
527 // Andy Goodrich: added missing check to the wake up code in suspend_me()
528 // so that we just return if the call to suspend_me() was issued from a
529 // stack unwinding.
530 //
531 // Revision 1.26 2011/04/13 02:44:26 acg
532 // Andy Goodrich: added m_unwinding flag in place of THROW_NOW because the
533 // throw status will be set back to THROW_*_RESET if reset is active and
534 // the check for an unwind being complete was expecting THROW_NONE as the
535 // clearing of THROW_NOW.
536 //
537 // Revision 1.25 2011/04/11 22:05:14 acg
538 // Andy Goodrich: use the DEBUG_NAME macro in DEBUG_MSG invocations.
539 //
540 // Revision 1.24 2011/04/10 22:12:32 acg
541 // Andy Goodrich: adding debugging macros.
542 //
543 // Revision 1.23 2011/04/08 22:41:28 acg
544 // Andy Goodrich: added comment pointing to the description of the reset
545 // mechanism in sc_reset.cpp.
546 //
547 // Revision 1.22 2011/04/08 18:27:33 acg
548 // Andy Goodrich: added check to make sure we don't schedule a running process
549 // because of it issues a notify() it is sensitive to.
550 //
551 // Revision 1.21 2011/04/05 06:22:38 acg
552 // Andy Goodrich: expanded comment for trigger_static() initial vetting.
553 //
554 // Revision 1.20 2011/04/01 21:24:57 acg
555 // Andy Goodrich: removed unused code.
556 //
557 // Revision 1.19 2011/02/19 08:30:53 acg
558 // Andy Goodrich: Moved process queueing into trigger_static from
559 // sc_event::notify.
560 //
561 // Revision 1.18 2011/02/18 20:27:14 acg
562 // Andy Goodrich: Updated Copyrights.
563 //
564 // Revision 1.17 2011/02/17 19:55:58 acg
565 // Andy Goodrich:
566 // (1) Changed signature of trigger_dynamic() back to a bool.
567 // (2) Simplified process control usage.
568 // (3) Changed trigger_static() to recognize process controls and to
569 // do the down-count on wait(N), allowing the elimination of
570 // ready_to_run().
571 //
572 // Revision 1.16 2011/02/16 22:37:31 acg
573 // Andy Goodrich: clean up to remove need for ps_disable_pending.
574 //
575 // Revision 1.15 2011/02/13 21:47:38 acg
576 // Andy Goodrich: update copyright notice.
577 //
578 // Revision 1.14 2011/02/13 21:35:54 acg
579 // Andy Goodrich: added error for performing a wait() during unwinding.
580 //
581 // Revision 1.13 2011/02/11 13:25:24 acg
582 // Andy Goodrich: Philipp A. Hartmann's changes:
583 // (1) Removal of SC_CTHREAD method overloads.
584 // (2) New exception processing code.
585 //
586 // Revision 1.12 2011/02/01 23:01:53 acg
587 // Andy Goodrich: removed dead code.
588 //
589 // Revision 1.11 2011/02/01 21:18:01 acg
590 // Andy Goodrich:
591 // (1) Changes in throw processing for new process control rules.
592 // (2) Support of new process_state enum values.
593 //
594 // Revision 1.10 2011/01/25 20:50:37 acg
595 // Andy Goodrich: changes for IEEE 1666 2011.
596 //
597 // Revision 1.9 2011/01/19 23:21:50 acg
598 // Andy Goodrich: changes for IEEE 1666 2011
599 //
600 // Revision 1.8 2011/01/18 20:10:45 acg
601 // Andy Goodrich: changes for IEEE1666_2011 semantics.
602 //
603 // Revision 1.7 2011/01/06 17:59:58 acg
604 // Andy Goodrich: removed debugging output.
605 //
606 // Revision 1.6 2010/07/22 20:02:33 acg
607 // Andy Goodrich: bug fixes.
608 //
609 // Revision 1.5 2009/07/28 01:10:53 acg
610 // Andy Goodrich: updates for 2.3 release candidate.
611 //
612 // Revision 1.4 2009/05/22 16:06:29 acg
613 // Andy Goodrich: process control updates.
614 //
615 // Revision 1.3 2009/03/12 22:59:58 acg
616 // Andy Goodrich: updates for 2.4 stuff.
617 //
618 // Revision 1.2 2008/05/22 17:06:06 acg
619 // Andy Goodrich: formatting and comments.
620 //
621 // Revision 1.1.1.1 2006/12/15 20:20:05 acg
622 // SystemC 2.3
623 //
624 // Revision 1.7 2006/05/08 17:57:13 acg
625 // Andy Goodrich: Added David Long's forward declarations for friend functions
626 // to keep the Microsoft C++ compiler happy.
627 //
628 // Revision 1.6 2006/04/20 17:08:17 acg
629 // Andy Goodrich: 3.0 style process changes.
630 //
631 // Revision 1.5 2006/04/11 23:13:21 acg
632 // Andy Goodrich: Changes for reduced reset support that only includes
633 // sc_cthread, but has preliminary hooks for expanding to method and thread
634 // processes also.
635 //
636 // Revision 1.4 2006/01/24 20:49:05 acg
637 // Andy Goodrich: changes to remove the use of deprecated features within the
638 // simulator, and to issue warning messages when deprecated features are used.
639 //
640 // Revision 1.3 2006/01/13 18:44:30 acg
641 // Added $Log to record CVS changes into the source.
642 
643 #endif // !defined(sc_thread_process_h_INCLUDED)
friend void sc_set_stack_size(sc_thread_handle, std::size_t)
#define sc_assert(expr)
Definition: sc_report.h:270
void signal_monitors(int type=0)
sc_process_b * sc_get_current_process_b()
sc_process_b * m_runnable_p
Definition: sc_process.h:440
Process base class support.
void add_monitor(sc_process_monitor *monitor_p)
std::vector< sc_process_monitor * > m_monitor_q
sc_cor * get_cor_pointer(sc_process_b *process_p)
bool trigger_dynamic(sc_event *)
virtual void resume_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
AND list of events.
Definition: sc_event.h:189
Coroutine abstract base classes.
void set_next_runnable(sc_thread_handle next_p)
friend void sc_thread_cor_fn(void *)
#define DEBUG_MSG(NAME, P, MSG)
sc_cor_pkg * cor_pkg()
const sc_event * m_event_p
Definition: sc_process.h:425
The event class.
Definition: sc_event.h:256
bool is_runnable() const
Definition: sc_process.h:526
void report_immediate_self_notification() const
virtual void throw_reset(bool async)
sc_thread_handle next_exist()
sc_process_b * m_exist_p
Definition: sc_process.h:428
Process reset support.
virtual void prepare_for_simulation()
const sc_event_list * m_event_list_p
Definition: sc_process.h:427
sc_event * m_reset_event_p
Definition: sc_process.h:438
sc_event * m_timeout_event_p
Definition: sc_process.h:450
Coroutine abstract base class.
Definition: sc_cor.h:61
virtual void yield(sc_cor *next_cor)=0
Base class for all structural entities.
Definition: sc_module.h:83
class SC_API sc_event
Definition: sc_interface.h:40
virtual void suspend_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
#define SC_REPORT_FATAL(msg_type, msg)
Definition: sc_report.h:228
void remove_monitor(sc_process_monitor *monitor_p)
#define SC_UNLIKELY_(x)
Definition: sc_cmnhdr.h:85
void(sc_process_host::* SC_ENTRY_FUNC)()
Definition: sc_process.h:152
friend void wait(sc_simcontext *)
virtual const char * kind() const
void sc_thread_cor_fn(void *arg)
int size() const
Definition: sc_event.h:571
trigger_t m_trigger_type
Definition: sc_process.h:451
The simulation context.
virtual void disable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
friend class sc_unwind_exception
Definition: sc_process.h:295
SC_API void sc_set_stack_size(sc_method_handle, std::size_t)
SC_API const char SC_ID_INTERNAL_ERROR_[]
Process spawning options specification.
class SC_API sc_module
Definition: sc_object.h:48
friend sc_cor * get_cor_pointer(sc_process_b *process_p)
void set_next_exist(sc_thread_handle next_p)
const char * name() const
Definition: sc_object.h:77
The time class.
Definition: sc_time.h:82
class sc_thread_process * sc_thread_handle
Definition: sc_process.h:67
class SC_API sc_reset
Definition: sc_signal.h:399
virtual void throw_it()=0
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report.h:223
sc_thread_process(const char *name_p, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)
OR list of events.
Definition: sc_event.h:224
void add_dynamic(sc_method_handle) const
sc_throw_it_helper * m_throw_helper_p
Definition: sc_process.h:447
void set_stack_size(std::size_t size)
sc_process_b sc_process_b
Definition: sc_process.h:458
virtual void kill_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
class SC_API sc_simcontext
Definition: sc_object.h:51
process_throw_type m_throw_status
Definition: sc_process.h:448
virtual void enable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
sc_simcontext * simcontext() const
Definition: sc_object.h:91
virtual void throw_user(const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
#define SC_API
Definition: sc_cmnhdr.h:168
sc_descendant_inclusion_info
Definition: sc_process.h:82
Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21.
sc_thread_handle next_runnable()
void SC_API wait(int, sc_simcontext *)