29 #if !defined(sc_process_h_INCLUDED)
30 #define sc_process_h_INCLUDED
42 class sc_process_handle;
43 class sc_thread_process;
129 #if defined(_MSC_VER)
130 #if ( _MSC_VER > 1200 )
131 # define SC_USE_MEMBER_FUNC_PTR
134 # define SC_USE_MEMBER_FUNC_PTR
140 #if defined(SC_USE_MEMBER_FUNC_PTR)
143 # define SC_DECL_HELPER_STRUCT(callback_tag, func)
144 # define SC_MAKE_FUNC_PTR(callback_tag, func) \
145 static_cast<sc_core::SC_ENTRY_FUNC>(&callback_tag::func)
150 #else // !defined(SC_USE_MEMBER_FUNC_PTR)
151 class sc_process_call_base {
153 inline sc_process_call_base()
157 virtual ~sc_process_call_base()
161 virtual void invoke(sc_process_host* host_p)
165 extern sc_process_call_base sc_process_defunct;
168 class sc_process_call :
public sc_process_call_base {
170 sc_process_call(
void (T::*method_p)() ) :
171 sc_process_call_base()
173 m_method_p = method_p;
176 virtual ~sc_process_call()
180 virtual void invoke(sc_process_host* host_p)
182 (((T*)host_p)->*m_method_p)();
186 void (T::*m_method_p)();
190 # define SC_DECL_HELPER_STRUCT(callback_tag, func)
191 # define SC_MAKE_FUNC_PTR(callback_tag, func) \
192 (::sc_core::SC_ENTRY_FUNC) (new \
193 ::sc_core::sc_process_call<callback_tag>(&callback_tag::func))
195 #endif // !defined(SC_USE_MEMBER_FUNC_PTR)
203 class sc_spawn_options;
204 class sc_unwind_exception;
234 template<
typename EXCEPT>
327 sc_process_b(
const char* name_p,
bool is_thread,
bool free_host,
352 const char*
gen_unique_name(
const char* basename_,
bool preserve_first );
366 void report_error(
const char* msgid,
const char* msg =
"" )
const;
395 void delete_process();
396 inline void reference_decrement();
397 inline void reference_increment();
459 reference_increment();
466 reference_decrement();
475 inline const ::std::vector<sc_object*>&
478 return m_child_objects;
601 inline void sc_process_b::reference_decrement()
614 inline void sc_process_b::reference_increment()
665 # ifndef SC_USE_MEMBER_FUNC_PTR
885 #endif // !defined(sc_process_h_INCLUDED)
virtual ~sc_throw_it_helper()
const sc_event * m_event_p
void trigger_reset_event()
void disconnect_process()
virtual sc_throw_it_helper * clone() const =0
sc_report * get_last_report()
sc_event & terminated_event()
virtual void throw_it()=0
bool sc_allow_process_control_corners
static sc_process_b * m_last_created_process_p
virtual bool remove_child_object(sc_object *)
const ::std::vector< sc_object * > & get_child_objects() const
void(sc_process_host::* SC_ENTRY_FUNC)()
virtual void throw_reset(bool async)=0
virtual void enable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
sc_clock period is zero sc_clock low time is zero sc_fifo< T > cannot have more than one writer bind interface to port failed complete binding failed remove port failed insert primitive channel failed sc_signal< T > cannot have more than one driver resolved port not bound to resolved signal sc_semaphore requires an initial value
uint64 const sc_uint_base int b
std::vector< sc_reset * > m_resets
virtual void throw_user(const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
sc_process_b sc_process_b
virtual void signal(sc_thread_handle thread_p, int type)
virtual void add_child_object(sc_object *)
void add_static_event(const sc_event &)
sc_process_b * m_runnable_p
sc_event * m_resume_event_p
virtual this_type * clone() const
class sc_thread_process * sc_thread_handle
const sc_event_list * m_event_list_p
sc_event * m_timeout_event_p
static sc_process_handle last_created_process_handle()
void report_immediate_self_notification() const
sc_curr_proc_kind m_process_kind
friend sc_process_handle sc_get_current_process_handle()
sc_process_b(const char *name_p, bool is_thread, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)
friend void sc_thread_cor_fn(void *arg)
void sc_set_stack_size(sc_method_handle, std::size_t)
virtual bool remove_child_object(sc_object *object_p)
virtual ~sc_process_monitor()
void initially_in_reset(bool async)
const char * sc_gen_unique_name(const char *, bool preserve_first)
sc_name_gen * m_name_gen_p
virtual void resume_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
friend const char * sc_gen_unique_name(const char *, bool preserve_first)
virtual void add_child_object(sc_object *object_p)
virtual bool terminated() const
void remove_static_events()
const char * gen_unique_name(const char *basename_, bool preserve_first)
void reset_process(reset_type rt, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
SC_ENTRY_FUNC m_semantics_method_p
sc_throw_it_helper * m_throw_helper_p
bool timed_out(sc_simcontext *)
sc_descendant_inclusion_info
std::vector< const sc_event * > m_static_events
void sc_thread_cor_fn(void *arg)
sc_event * m_term_event_p
void report_error(const char *msgid, const char *msg="") const
class sc_cthread_process * sc_cthread_handle
sc_process_handle sc_get_current_process_handle()
void reset_changed(bool async, bool asserted)
virtual void kill_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
friend class sc_reset_finder
class sc_method_process * sc_method_handle
sc_curr_proc_kind proc_kind() const
sc_throw_it(const EXCEPT &value)
bool dont_initialize() const
void remove_dynamic_events(bool skip_timeout=false)
virtual void suspend_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
process_throw_type m_throw_status
sc_report * m_last_report_p
void set_last_report(sc_report *last_p)
sc_process_host * m_semantics_host_p
sc_event * m_reset_event_p
virtual void disable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
bool is_unwinding() const
std::string dump_state() const
static sc_process_b * last_created_process_base()
virtual ~sc_process_host()