29 #if !defined(sc_thread_process_h_INCLUDED) 
   30 #define sc_thread_process_h_INCLUDED 
   48 #   define DEBUG_NAME "" 
   49 #   define DEBUG_MSG(NAME,P,MSG) \ 
   51         if ( P && ( (strlen(NAME)==0) || !strcmp(NAME,P->name())) ) \ 
   52           std::cout << "**** " << sc_time_stamp() << " ("  \ 
   53                     << sc_get_current_process_name() << "): " << MSG \ 
   54                     << " - " << P->name() << std::endl; \ 
   57 #   define DEBUG_MSG(NAME,P,MSG)  
   61 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR 
   62 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE" 
   67 class sc_event_and_list;
 
   68 class sc_event_or_list;
 
   75 class sc_process_handle;
 
   76 class sc_process_table;
 
   84 void wait( 
int , sc_simcontext* );
 
   85 void wait( 
const sc_event&, 
int , sc_simcontext* );
 
   86 void wait( 
const sc_event_or_list&, 
int , sc_simcontext* );
 
   87 void wait( 
const sc_event_and_list&, 
int , sc_simcontext* );
 
   88 void wait( 
const sc_time&, 
int , sc_simcontext* );
 
   89 void wait( 
const sc_time&, 
const sc_event&, 
int , sc_simcontext* );
 
   90 void wait( 
const sc_time&, 
const sc_event_or_list&, 
int , sc_simcontext* );
 
   91 void wait( 
const sc_time&, 
const sc_event_and_list&, 
int , sc_simcontext* );
 
  137   virtual const char* 
kind()
 const 
  138   { 
return "sc_thread_process"; }
 
  322         DEBUG_MSG( DEBUG_NAME , 
this, 
"suspending thread");
 
  324         DEBUG_MSG( DEBUG_NAME , 
this, 
"resuming thread");
 
  342         DEBUG_MSG( DEBUG_NAME , 
this, 
"throwing reset for");
 
  347         DEBUG_MSG( DEBUG_NAME, 
this, 
"invoking throw_it for");
 
  355         DEBUG_MSG( DEBUG_NAME, 
this, 
"throwing kill for");
 
  360         DEBUG_MSG( DEBUG_NAME, 
this, 
"restarting thread");
 
  512         e.add_dynamic( 
this );
 
  684         e.add_dynamic( 
this );
 
  817     for ( 
int mon_i = 0; mon_i < mon_n; mon_i++ )
 
  890 #if ! defined( SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS ) 
  896 #endif // SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS 
  919         switch( e->m_notify_type )
 
  921             case sc_event::DELTA: 
 
  931             case sc_event::TIMED: 
 
  941         simcontext()->update_oldest_time( curr_time );
 
 1079 #endif // !defined(sc_thread_process_h_INCLUDED) 
friend void sc_thread_cor_fn(void *)
void report_immediate_self_notification() const 
sc_throw_it_helper * m_throw_helper_p
sc_event * m_reset_event_p
sc_process_b * sc_get_current_process_b()
bool deliver_event_at_time(sc_event *e, sc_timestamp e_delivery_time)
virtual void resume_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void add_monitor(sc_process_monitor *monitor_p)
friend void wait(int, sc_simcontext *)
virtual void throw_reset(bool async)
void notify()
The immediate notification is not supported by the out-of-order simulation in the current release...
void set_next_runnable(sc_thread_handle next_p)
A scoped mutex for the kernel lock. 
process_throw_type m_throw_status
#define SC_REPORT_ERROR(msg_type, msg)
sc_process_b sc_process_b
A time stamp combining timed cycles and delta cycles. 
const sc_time & get_time_count() const 
Get the value of timed cycles. 
void oooschedule(sc_cor *cor)
Scheduling function in the OoO simulation. 
virtual void prepare_for_simulation()
sc_descendant_inclusion_info
This class provides access to an sc_process_b object instance in a manner which allows some persisten...
void(sc_process_host::* SC_ENTRY_FUNC)()
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)
void signal_monitors(int type=0)
sc_event * m_timeout_event_p
void wait(int, sc_simcontext *)
sc_cor * get_cor_pointer(sc_process_b *process_p)
friend class sc_process_table
Coroutine abstract base class. 
const char * name() const 
sc_simcontext * simcontext() const 
const sc_event * m_event_p
void sc_thread_cor_fn(void *arg)
void add_dynamic(sc_method_handle) const 
User initiated dynamic process support. 
virtual void suspend_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void trigger_static(sc_event *)
A new parameter is added to update the local time stamp in the thread process. 
virtual ~sc_thread_process()
void set_stack_size(std::size_t size)
void set_next_exist(sc_thread_handle next_p)
Class that manages the ready-to-run queues. 
sc_thread_handle next_exist()
sc_timestamp first_triggerable_time
void lock_all_channels(void)
Acquire all the channel locks. 
class sc_thread_process * sc_thread_handle
const sc_timestamp & get_notify_timestamp() const 
GET the notification time stamp. 
void wait_cycles(int, int n=1)
A new parameter segment ID is added for the out-of-order simulation. 
void remove_running_process(sc_process_b *)
Remove a process from the running queue. 
virtual void disable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
#define DEBUG_MSG(NAME, P, MSG)
friend class sc_unwind_exception
Base class for all structural entities. 
void unlock_all_channels(void)
Release all the channel locks. 
bool is_running_process(sc_process_b *)
Check whether a process is in the running queue. 
sc_timestamp m_timestamp
The local time stamp of this process. 
friend void sc_set_stack_size(sc_thread_handle, std::size_t)
virtual void throw_user(const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
Base class for all hierarchical channels. 
virtual void throw_it()=0
sc_thread_handle next_runnable()
virtual void kill_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
sc_simcontext * sc_get_curr_simcontext()
void set_timestamp(const sc_timestamp &ts)
Get the local time stamp of this process. 
void sc_set_stack_size(sc_method_handle, std::size_t)
friend sc_cor * get_cor_pointer(sc_process_b *process_p)
const sc_time SC_ZERO_TIME
This is the base class for objects which may have processes defined for their methods (e...
void remove_monitor(sc_process_monitor *monitor_p)
bool trigger_dynamic(sc_event *, bool &)
sc_process_b * m_runnable_p
std::vector< sc_process_monitor * > m_monitor_q
virtual const char * kind() const 
value_type get_delta_count() const 
Get the value of delta cycles. 
virtual void enable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void suspend_cor(sc_cor *)
Suspend a coroutine. 
void set_segment_id(int id)
Get the current segment ID of this process. 
int m_process_state
The name of this process. 
const sc_event_list * m_event_list_p