SystemC  Recoding Infrastructure for SystemC v0.6.3 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
sc_runnable_int.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  The following code is derived, directly or indirectly, from the SystemC
4  source code Copyright (c) 1996-2014 by all Contributors.
5  All Rights reserved.
6 
7  The contents of this file are subject to the restrictions and limitations
8  set forth in the SystemC Open Source License (the "License");
9  You may not use this file except in compliance with such restrictions and
10  limitations. You may obtain instructions on how to receive a copy of the
11  License at http://www.accellera.org/. Software distributed by Contributors
12  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13  ANY KIND, either express or implied. See the License for the specific
14  language governing rights and limitations under the License.
15 
16  ******************************************************************************/
17 
18 /*******************************************************************************
19 
20  sc_runnable_int.h -- For inline definitions of some utility functions.
21  DO NOT EXPORT THIS INCLUDE FILE. Include this file
22  after "sc_process_int.h" so that we can get the base
23  class right.
24 
25  Original Author: Bishnupriya Bhattacharya , Cadence Design, 28th July, 2003
26 
27  CHANGE LOG AT THE END OF THE FILE
28  ******************************************************************************/
29 
30 #ifndef SC_RUNNABLE_INT_H
31 #define SC_RUNNABLE_INT_H
32 
33 
37 // 02/22/2016 ZC: to enable verbose display or not
38 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR
39 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE"
40 #endif
41 // DEBUGGING MACROS:
42 //
43 // DEBUG_MSG(NAME,P,MSG)
44 // MSG = message to print
45 // NAME = name that must match the process for the message to print, or
46 // null if the message should be printed unconditionally.
47 // P = pointer to process message is for, or NULL in which case the
48 // message will not print.
49 #if 0
50 # define DEBUG_NAME ""
51 # define DEBUG_MSG(NAME,P,MSG) \
52  { \
53  if ( P && ( (strlen(NAME)==0) || !strcmp(NAME,P->name())) ) \
54  std::cout << "**** " << sc_time_stamp() << " (" \
55  << sc_get_current_process_name() << "): " << MSG \
56  << " - " << P->name() << std::endl; \
57  }
58 #else
59 # define DEBUG_MSG(NAME,P,MSG)
60 #endif
61 
62 namespace sc_core {
63 
64 // The values below are used to indicate when a queue is empty. A non-zero
65 // non-legal pointer value is used for this so that a zero value in the
66 // m_execute_p field of an sc_process_b instance can be used to indicate
67 // that is has not been queued for run. (If we did not use a non-zero
68 // queue empty indicator then a sc_process_b instance that was queued
69 // twice in a row might end up on the queue twice if it were the first
70 // one that was queued!)
71 
72 #define SC_NO_METHODS ((sc_method_handle)0xdb)
73 #define SC_NO_THREADS ((sc_thread_handle)0xdb)
74 
75 
76 //------------------------------------------------------------------------------
77 //"sc_runnable::dump"
78 //
79 // This method dumps the contents of this object instance.
80 //------------------------------------------------------------------------------
81 inline void sc_runnable::dump() const
82 {
83  // Dump the thread queues:
84 
85  std::cout << "thread pop queue: " << std::endl;
86  for ( sc_thread_handle p = m_threads_pop; p != SC_NO_THREADS;
87  p = p->next_runnable() )
88  {
89  std::cout << " " << p << std::endl;
90  }
91 
92  std::cout << "thread push queue: " << std::endl;
93  for ( sc_thread_handle p = m_threads_push_head->next_runnable();
94  p != SC_NO_THREADS; p = p->next_runnable() )
95  {
96  std::cout << " " << p << std::endl;
97  }
98 }
99 
100 //------------------------------------------------------------------------------
101 //"sc_runnable::execute_method_next"
102 //
103 // This method pushes the the supplied method to execute as the next process.
104 // This is done by pushing it onto the front of the m_methods_pop.
105 // method_h -> method process to add to the queue.
106 //------------------------------------------------------------------------------
108 {
109  DEBUG_MSG(DEBUG_NAME,method_h,"pushing this method to execute next");
110  method_h->set_next_runnable( m_methods_pop );
111  m_methods_pop = method_h;
112 }
113 
114 //------------------------------------------------------------------------------
115 //"sc_runnable::execute_thread_next"
116 //
117 // This method pushes the the supplied thread to execute as the next process.
118 // This is done by pushing it onto the front of the m_threads_pop.
119 // thread_h -> thread process to add to the queue.
120 //------------------------------------------------------------------------------
122 {
123  DEBUG_MSG(DEBUG_NAME,thread_h,"pushing this thread to execute next");
124  thread_h->set_next_runnable( m_threads_pop );
125  m_threads_pop = thread_h;
126 }
127 
128 //------------------------------------------------------------------------------
129 //"sc_runnable::init"
130 //
131 // This method initializes this object instance. Note we allocate the queue
132 // heads if necessary. This is done here rather than in the constructor for
133 // this class to eliminate CTOR processing errors with gcc.
134 //------------------------------------------------------------------------------
135 inline void sc_runnable::init()
136 {
137  m_methods_pop = SC_NO_METHODS;
138  if ( !m_methods_push_head )
139  {
140  m_methods_push_head = new sc_method_process("methods_push_head", true,
141  (SC_ENTRY_FUNC)0, 0, 0);
142  m_methods_push_head->dont_initialize(true);
143  m_methods_push_head->detach();
144  }
145  m_methods_push_tail = m_methods_push_head;
146  m_methods_push_head->set_next_runnable(SC_NO_METHODS);
147 
148  m_threads_pop = SC_NO_THREADS;
149  if ( !m_threads_push_head )
150  {
151  m_threads_push_head = new sc_thread_process("threads_push_head", true,
152  (SC_ENTRY_FUNC)0, 0, 0);
153  m_threads_push_head->dont_initialize(true);
154  m_threads_push_head->detach();
155  }
156  m_threads_push_head->set_next_runnable(SC_NO_THREADS);
157  m_threads_push_tail = m_threads_push_head;
158 }
159 
160 
161 //------------------------------------------------------------------------------
162 //"sc_runnable::is_empty"
163 //
164 // This method returns true if the push queue is empty, or false if not.
165 //------------------------------------------------------------------------------
166 inline bool sc_runnable::is_empty() const
167 {
168  return m_methods_push_head->next_runnable() == SC_NO_METHODS &&
169  m_methods_pop == SC_NO_METHODS &&
170  m_threads_push_head->next_runnable() == SC_NO_THREADS &&
171  m_threads_pop == SC_NO_THREADS;
172 }
173 
174 
175 //------------------------------------------------------------------------------
176 //"sc_runnable::is_initialized"
177 //
178 // This method returns true if the push queue is already initialized.
179 //------------------------------------------------------------------------------
180 inline bool sc_runnable::is_initialized() const
181 {
182  return m_methods_push_head && m_threads_push_head;
183 }
184 
185 
186 //------------------------------------------------------------------------------
187 //"sc_runnable::push_back_method"
188 //
189 // This method pushes the supplied method process onto the back of the queue of
190 // runnable method processes.
191 // method_h -> method process to add to the queue.
192 //------------------------------------------------------------------------------
194 {
195  //ZC 11:01 2017/3/13
196  method_h->m_process_state=1;
197  sc_get_curr_simcontext()->remove_from_wait_queue((sc_process_b*)method_h);
198 
199  // assert( method_h->next_runnable() == 0 ); // Can't queue twice.
200  DEBUG_MSG(DEBUG_NAME,method_h,"pushing back method");
201  method_h->set_next_runnable(SC_NO_METHODS);
202  m_methods_push_tail->set_next_runnable(method_h);
203  m_methods_push_tail = method_h;
204 }
205 
206 
207 //------------------------------------------------------------------------------
208 //"sc_runnable::push_back_thread"
209 //
210 // This method pushes the supplied thread process onto the back of the queue of
211 // runnable thread processes.
212 // thread_h -> thread process to add to the queue.
213 //------------------------------------------------------------------------------
215 {
216  //ZC 11:01 2017/3/13
217  thread_h->m_process_state=1;
218  sc_get_curr_simcontext()->remove_from_wait_queue((sc_process_b*)thread_h);
219 
220  // assert( thread_h->next_runnable() == 0 ); // Can't queue twice.
221  DEBUG_MSG(DEBUG_NAME,thread_h,"pushing back thread");
222  thread_h->set_next_runnable(SC_NO_THREADS);
223  m_threads_push_tail->set_next_runnable(thread_h);
224  m_threads_push_tail = thread_h;
225 }
226 
227 
228 //------------------------------------------------------------------------------
229 //"sc_runnable::push_front_method"
230 //
231 // This method pushes the supplied method process onto the front of the queue of
232 // runnable method processes. If the queue is empty the process is the tail
233 // also.
234 // method_h -> method process to add to the queue.
235 //------------------------------------------------------------------------------
237 {
238  //ZC 11:01 2017/3/13
239  method_h->m_process_state=1;
240  sc_get_curr_simcontext()->remove_from_wait_queue((sc_process_b*)method_h);
241 
242  // assert( method_h->next_runnable() == 0 ); // Can't queue twice.
243  DEBUG_MSG(DEBUG_NAME,method_h,"pushing front method");
244  method_h->set_next_runnable(m_methods_push_head->next_runnable());
245  if ( m_methods_push_tail == m_methods_push_head ) // Empty queue.
246  {
247  m_methods_push_tail->set_next_runnable(method_h);
248  m_methods_push_tail = method_h;
249  }
250  else // Non-empty queue.
251  {
252  m_methods_push_head->set_next_runnable(method_h);
253  }
254 }
255 
256 
257 //------------------------------------------------------------------------------
258 //"sc_runnable::push_front_thread"
259 //
260 // This method pushes the supplied thread process onto the front of the queue of
261 // runnable thread processes. If the queue is empty the process is the tail
262 // also.
263 // thread_h -> thread process to add to the queue.
264 //------------------------------------------------------------------------------
266 {
267  //ZC 11:01 2017/3/13
268  thread_h->m_process_state=1;
269  sc_get_curr_simcontext()->remove_from_wait_queue((sc_process_b*)thread_h);
270 
271  // assert( thread_h->next_runnable() == 0 ); // Can't queue twice.
272  DEBUG_MSG(DEBUG_NAME,thread_h,"pushing front thread");
273  thread_h->set_next_runnable(m_threads_push_head->next_runnable());
274  if ( m_threads_push_tail == m_threads_push_head ) // Empty queue.
275  {
276  m_threads_push_tail->set_next_runnable(thread_h);
277  m_threads_push_tail = thread_h;
278  }
279  else // Non-empty queue.
280  {
281  m_threads_push_head->set_next_runnable(thread_h);
282  }
283 }
284 
285 //------------------------------------------------------------------------------
286 //"sc_runnable::pop_method"
287 //
288 // This method pops the next method process to be executed, or returns a null
289 // if no method processes are available for execution.
290 //------------------------------------------------------------------------------
292 {
293  sc_method_handle result_p;
294 
295  result_p = m_methods_pop;
296  if ( result_p != SC_NO_METHODS )
297  {
298  m_methods_pop = result_p->next_runnable();
299  result_p->set_next_runnable(0);
300  }
301  else
302  {
303  result_p = 0;
304  }
305  DEBUG_MSG(DEBUG_NAME,result_p,"popping method");
306  return result_p;
307 
308 }
309 
310 //------------------------------------------------------------------------------
311 //"sc_runnable::pop_thread"
312 //
313 // This method pops the next thread process to be executed, or returns a null
314 // if no thread processes are available for execution.
315 //------------------------------------------------------------------------------
317 {
318  sc_thread_handle result_p;
319 
320  result_p = m_threads_pop;
321  if ( result_p != SC_NO_THREADS )
322  {
323  m_threads_pop = result_p->next_runnable();
324  result_p->set_next_runnable(0);
325  }
326  else
327  {
328  result_p = 0;
329  }
330  DEBUG_MSG(DEBUG_NAME,result_p,"popping thread for execution");
331  return result_p;
332 }
333 
334 
335 //------------------------------------------------------------------------------
336 //"sc_runnable::remove_method"
337 //
338 // This method removes the supplied method process from the push queue if it is
339 // present. Note we clear the method's next pointer so that it may be queued
340 // again.
341 // remove_p -> method process to remove from the run queue.
342 //------------------------------------------------------------------------------
344 {
345  sc_method_handle now_p; // Method now checking.
346  sc_method_handle prior_p; // Method prior to now_p.
347 
348  // Don't try to remove things if we have not been initialized.
349 
350  if ( !is_initialized() ) return;
351 
352  // Search the push queue:
353 
354  prior_p = m_methods_push_head;
355  for ( now_p = m_methods_push_head; now_p!= SC_NO_METHODS;
356  now_p = now_p->next_runnable() )
357  {
358  if ( remove_p == now_p )
359  {
360  prior_p->set_next_runnable( now_p->next_runnable() );
361  if (now_p == m_methods_push_tail) {
362  m_methods_push_tail = prior_p;
363  }
364  now_p->set_next_runnable(0);
365  DEBUG_MSG(DEBUG_NAME,now_p,"removing method from push queue");
366  return;
367  }
368  prior_p = now_p;
369  }
370 
371  // Search the pop queue:
372 
373  prior_p = NULL;
374  for ( now_p = m_methods_pop; now_p != SC_NO_METHODS;
375  now_p = now_p->next_runnable() )
376  {
377  if ( remove_p == now_p )
378  {
379  if ( prior_p )
380  prior_p->set_next_runnable( now_p->next_runnable() );
381  else
382  m_methods_pop = now_p->next_runnable();
383  now_p->set_next_runnable(0);
384  DEBUG_MSG(DEBUG_NAME,now_p,"removing method from pop queue");
385  return;
386  }
387  prior_p = now_p;
388  }
389 }
390 
391 
392 //------------------------------------------------------------------------------
393 //"sc_runnable::remove_thread"
394 //
395 // This method removes the supplied thread process from the push or pop
396 // queue if it is present. Note we clear the thread's next pointer so that it
397 // may be queued again.
398 // remove_p -> thread process to remove from the run queue.
399 //------------------------------------------------------------------------------
401 {
402  sc_thread_handle now_p; // Thread now checking.
403  sc_thread_handle prior_p; // Thread prior to now_p.
404 
405  // Don't try to remove things if we have not been initialized.
406 
407  if ( !is_initialized() ) return;
408 
409  // Search the push queue:
410 
411  prior_p = m_threads_push_head;
412  for ( now_p = m_threads_push_head; now_p != SC_NO_THREADS;
413  now_p = now_p->next_runnable() )
414  {
415  if ( remove_p == now_p )
416  {
417  prior_p->set_next_runnable( now_p->next_runnable() );
418  if (now_p == m_threads_push_tail) {
419  m_threads_push_tail = prior_p;
420  }
421  now_p->set_next_runnable(0);
422  DEBUG_MSG(DEBUG_NAME,now_p,"removing thread from push queue");
423  return;
424  }
425  prior_p = now_p;
426  }
427 
428  // Search the pop queue:
429 
430  prior_p = NULL;
431  for ( now_p = m_threads_pop; now_p != SC_NO_THREADS;
432  now_p = now_p->next_runnable() )
433  {
434  if ( remove_p == now_p )
435  {
436  if ( prior_p )
437  prior_p->set_next_runnable( now_p->next_runnable() );
438  else
439  m_threads_pop = now_p->next_runnable();
440  now_p->set_next_runnable(0);
441  DEBUG_MSG(DEBUG_NAME,now_p,"removing thread from pop queue");
442  return;
443  }
444  prior_p = now_p;
445  }
446 }
447 
448 //------------------------------------------------------------------------------
449 //"sc_runnable::sc_runnable"
450 //
451 // This is the object instance constructor for this class.
452 //------------------------------------------------------------------------------
454  m_methods_push_head(0), m_methods_push_tail(0), m_methods_pop(SC_NO_METHODS),
455  m_threads_push_head(0), m_threads_push_tail(0), m_threads_pop(SC_NO_THREADS)
456 {}
457 
458 //------------------------------------------------------------------------------
459 //"sc_runnable::~sc_runnable"
460 //
461 // This is the object instance destructor for this class.
462 //------------------------------------------------------------------------------
464 {
465  delete m_methods_push_head;
466  delete m_threads_push_head;
467 }
468 
469 
470 //------------------------------------------------------------------------------
471 //"sc_runnable::toggle_methods"
472 //
473 // This method moves the methods push queue to the pop queue and zeros the push
474 // queue. This will only be done if the pop queue is presently empty.
475 //------------------------------------------------------------------------------
477 {
478  if ( m_methods_pop == SC_NO_METHODS )
479  {
480  m_methods_pop = m_methods_push_head->next_runnable();
481  m_methods_push_head->set_next_runnable(SC_NO_METHODS);
482  m_methods_push_tail = m_methods_push_head;
483  }
484 }
485 
486 
487 //------------------------------------------------------------------------------
488 //"sc_runnable::toggle_threads"
489 //
490 // This method moves the threads push queue to the pop queue and zeros the push
491 // queue. This will only be done if the pop queue is presently empty.
492 //------------------------------------------------------------------------------
494 {
495  if ( m_threads_pop == SC_NO_THREADS )
496  {
497  m_threads_pop = m_threads_push_head->next_runnable();
498  m_threads_push_head->set_next_runnable(SC_NO_THREADS);
499  m_threads_push_tail = m_threads_push_head;
500  }
501 }
502 
503 
504 //------------------------------------------------------------------------------
505 //"sc_runnable::get_methods_push_first"
506 //
507 // This method returns the first method of methods push queue.
508 //------------------------------------------------------------------------------
510 {
511  return m_methods_push_head->next_runnable();
512 }
513 
514 
515 //------------------------------------------------------------------------------
516 //"sc_runnable::is_methods_push_end"
517 //
518 // This method checks whether method_h is the end of methods push queue. Return
519 // true if method_h equals SC_NO_METHODS, which is right after the last method.
520 //------------------------------------------------------------------------------
522 {
523  return ( method_h == SC_NO_METHODS );
524 }
525 
526 
527 //------------------------------------------------------------------------------
528 //"sc_runnable::get_methods_pop_first"
529 //
530 // This method returns the first method of methods pop queue.
531 //------------------------------------------------------------------------------
533 {
534  return m_methods_pop;
535 }
536 
537 
538 //------------------------------------------------------------------------------
539 //"sc_runnable::is_methods_pop_end"
540 //
541 // This method checks whether method_h is the end of methods pop queue. Return
542 // true if method_h equals SC_NO_METHODS, which is right after the last method.
543 //------------------------------------------------------------------------------
545 {
546  return ( method_h == SC_NO_METHODS );
547 }
548 
549 
550 //------------------------------------------------------------------------------
551 //"sc_runnable::get_threads_push_first"
552 //
553 // This method returns the first thread of threads push queue.
554 //------------------------------------------------------------------------------
556 {
557  return m_threads_push_head->next_runnable();
558 }
559 
560 
561 //------------------------------------------------------------------------------
562 //"sc_runnable::is_threads_push_end"
563 //
564 // This method checks whether thread_h is the end of threads push queue. Return
565 // true if thread_h equals SC_NO_THREADS, which is right after the last thread.
566 //------------------------------------------------------------------------------
568 {
569  return ( thread_h == SC_NO_THREADS );
570 }
571 
572 
573 //------------------------------------------------------------------------------
574 //"sc_runnable::get_threads_pop_first"
575 //
576 // This method returns the first thread of threads pop queue.
577 //------------------------------------------------------------------------------
579 {
580  return m_threads_pop;
581 }
582 
583 
584 //------------------------------------------------------------------------------
585 //"sc_runnable::is_threads_pop_end"
586 //
587 // This method checks whether thread_h is the end of threads pop queue. Return
588 // true if thread_h equals SC_NO_THREADS, which is right after the last thread.
589 //------------------------------------------------------------------------------
591 {
592  return ( thread_h == SC_NO_THREADS );
593 }
594 
595 #undef SC_NO_METHODS
596 #undef SC_NO_THREADS
597 #undef DEBUG_MSG
598 
599 } // namespace sc_core
600 
601 
602 /*******************************************************************************
603 
604  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
605  changes you are making here.
606  Andy Goodrich, Forte Design Systems, 2 September 2003
607  Changed queue heads to instances to eliminate the checks for null heads.
608 
609  ******************************************************************************/
610 
611 // $Log: sc_runnable_int.h,v $
612 // Revision 1.19 2011/08/24 22:05:51 acg
613 // Torsten Maehne: initialization changes to remove warnings.
614 //
615 // Revision 1.18 2011/08/07 19:08:04 acg
616 // Andy Goodrich: moved logs to end of file so line number synching works
617 // better between versions.
618 //
619 // Revision 1.17 2011/04/13 02:45:11 acg
620 // Andy Goodrich: eliminated warning message that occurred if the DEBUG_MSG
621 // macro was used.
622 //
623 // Revision 1.16 2011/04/10 22:18:23 acg
624 // Andy Goodrich: debugging message clean up.
625 //
626 // Revision 1.15 2011/04/08 18:26:07 acg
627 // Andy Goodrich: added execute_method_next() to handle method dispatch
628 // for asynchronous notifications that occur outside the evaluation phase.
629 //
630 // Revision 1.14 2011/04/01 21:31:10 acg
631 // Andy Goodrich: turn off diagnostic messages by default.
632 //
633 // Revision 1.13 2011/04/01 21:30:02 acg
634 // Andy Goodrich: inserted conditional displays for queue manipulations.
635 //
636 // Revision 1.12 2011/03/30 00:01:34 acg
637 // Philip A. Hartmann: change break to return in remove_method() to short
638 // circuit the search the way remove_thread() works.
639 //
640 // Revision 1.11 2011/03/28 13:02:52 acg
641 // Andy Goodrich: Changes for disable() interactions.
642 //
643 // Revision 1.10 2011/03/06 15:58:17 acg
644 // Andy Goodrich: formatting changes.
645 //
646 // Revision 1.9 2011/02/18 20:27:14 acg
647 // Andy Goodrich: Updated Copyrights.
648 //
649 // Revision 1.8 2011/02/13 21:47:38 acg
650 // Andy Goodrich: update copyright notice.
651 //
652 // Revision 1.7 2011/02/02 06:37:03 acg
653 // Andy Goodrich: removed toggle() method since it is no longer used.
654 //
655 // Revision 1.6 2011/02/01 21:09:13 acg
656 // Andy Goodrich: addition of toggle_methods() and toggle_threads() calls.
657 //
658 // Revision 1.5 2011/01/25 20:50:37 acg
659 // Andy Goodrich: changes for IEEE 1666 2011.
660 //
661 // Revision 1.4 2010/07/22 20:02:33 acg
662 // Andy Goodrich: bug fixes.
663 //
664 // Revision 1.3 2009/02/28 00:26:58 acg
665 // Andy Goodrich: changed boost name space to sc_boost to allow use with
666 // full boost library applications.
667 //
668 // Revision 1.2 2008/05/22 17:06:26 acg
669 // Andy Goodrich: updated copyright notice to include 2008.
670 //
671 // Revision 1.1.1.1 2006/12/15 20:20:05 acg
672 // SystemC 2.3
673 //
674 // Revision 1.4 2006/04/20 17:08:17 acg
675 // Andy Goodrich: 3.0 style process changes.
676 //
677 // Revision 1.3 2006/01/13 18:44:30 acg
678 // Added $Log to record CVS changes into the source.
679 //
680 
681 #endif // SC_RUNNABLE_INT_H
682 
683 // Taf!
#define DEBUG_MSG(NAME, P, MSG)
#define SC_NO_METHODS
void push_back_thread(sc_thread_handle)
#define SC_NO_THREADS
bool is_threads_pop_end(sc_thread_handle)
Check whether it is the end of threads pop queue.
sc_thread_handle pop_thread()
sc_thread_handle get_threads_push_first()
Return the first thread of threads push queue.
bool is_methods_push_end(sc_method_handle)
Check whether it is the end of methods push queue.
void push_back_method(sc_method_handle)
void(sc_process_host::* SC_ENTRY_FUNC)()
Definition: sc_process.h:212
void execute_method_next(sc_method_handle)
sc_method_handle get_methods_pop_first()
Return the first method of methods pop queue.
class sc_method_process * sc_method_handle
Definition: sc_process.h:120
User initiated dynamic process support.
Definition: sc_process.h:558
void remove_method(sc_method_handle)
bool is_initialized() const
void push_front_thread(sc_thread_handle)
void push_front_method(sc_method_handle)
class sc_thread_process * sc_thread_handle
Definition: sc_process.h:121
sc_thread_handle get_threads_pop_first()
Return the first thread of threads pop queue.
sc_method_handle pop_method()
void remove_thread(sc_thread_handle)
sc_method_handle get_methods_push_first()
Return the first method of methods push queue.
void execute_thread_next(sc_thread_handle)
bool is_threads_push_end(sc_thread_handle)
Check whether it is the end of threads push queue.
sc_simcontext * sc_get_curr_simcontext()
bool is_empty() const
bool is_methods_pop_end(sc_method_handle)
Check whether it is the end of methods pop queue.