31#ifndef SC_PROCESS_H_INCLUDED_
32#define SC_PROCESS_H_INCLUDED_
39#if defined(_MSC_VER) && !defined(SC_WIN_DLL_WARN)
41#pragma warning(disable: 4251)
47class sc_process_handle;
48class sc_thread_process;
133#define SC_MAKE_FUNC_PTR(callback_tag, func) \
134 static_cast<sc_core::sc_entry_func>(&callback_tag::func)
172template<
typename EXCEPT>
210 friend class sc_process_table;
246 ps_bit_ready_to_run = 2,
247 ps_bit_suspended = 4,
253 reset_asynchronous = 0,
299 virtual void add_child_object(
sc_object* );
300 virtual void add_child_event(
sc_event* );
301 virtual bool remove_child_object(
sc_object* );
302 virtual bool remove_child_event(
sc_event* );
305 bool dynamic()
const {
return m_dynamic_proc != SPAWN_ELAB; }
307 inline bool is_disabled()
const;
308 inline bool is_runnable()
const;
309 static inline sc_process_b* last_created_process_base();
314 delete m_last_report_p;
315 m_last_report_p = last_p;
327 inline void initially_in_reset(
bool async );
328 inline bool is_unwinding()
const;
329 inline bool start_unwinding();
330 inline bool clear_unwinding();
343 virtual bool terminated()
const;
347 void delete_process();
348 inline void reference_decrement();
349 inline void reference_increment();
356 inline void semantics();
417 sc_object_host::add_child_object( object_p );
418 reference_increment();
424 sc_object_host::add_child_event( event_p );
425 reference_increment();
431 if ( sc_object_host::remove_child_object( object_p ) ) {
432 reference_decrement();
441 if ( sc_object_host::remove_child_event( event_p ) ) {
442 reference_decrement();
567inline void sc_process_b::reference_decrement()
580inline void sc_process_b::reference_increment()
660#if defined(_MSC_VER) && !defined(SC_WIN_DLL_WARN)
SC_API bool timed_out(sc_simcontext *)
class sc_cthread_process * sc_cthread_handle
SC_API bool sc_allow_process_control_corners
class sc_method_process * sc_method_handle
SC_API void sc_set_stack_size(sc_method_handle, std::size_t)
class sc_thread_process * sc_thread_handle
SC_API sc_process_handle sc_get_current_process_handle()
void sc_thread_cor_fn(void *arg)
void(sc_process_host::* sc_entry_func)()
sc_descendant_inclusion_info
uint64 const sc_uint_base int b
sc_core::sc_signal_in_if< T > & value(const T &val)
virtual ~sc_process_host()
virtual void signal(sc_thread_handle thread_p, int type)
virtual ~sc_process_monitor()
virtual sc_throw_it_helper * clone() const =0
virtual void throw_it()=0
virtual ~sc_throw_it_helper()
sc_throw_it(const EXCEPT &value)
virtual this_type * clone() const
sc_report * m_last_report_p
void report_error(const char *msgid, const char *msg="") const
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 SC_API void sc_suspend_all()
void disconnect_process()
bool dont_initialize() const
std::string dump_state() const
friend SC_API bool timed_out(sc_simcontext *)
sc_event & terminated_event()
sc_event * m_resume_event_p
sc_event * m_reset_event_p
void report_immediate_self_notification() const
virtual void resume_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
sc_report * get_last_report()
virtual void enable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
friend void sc_thread_cor_fn(void *arg)
virtual void kill_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
friend SC_API void sc_unsuspendable()
sc_event * m_term_event_p
void initially_in_reset(bool async)
sc_process_b * m_runnable_p
virtual void dont_initialize(bool dont)
static sc_process_b * m_last_created_process_p
friend SC_API void sc_suspendable()
virtual void throw_reset(bool async)=0
static sc_process_b * last_created_process_base()
virtual void add_child_event(sc_event *)
process_throw_type m_throw_status
const sc_event_list * m_event_list_p
sc_throw_it_helper * m_throw_helper_p
virtual bool terminated() const
sc_event * m_timeout_event_p
sc_entry_func m_semantics_method_p
void reset_process(reset_type rt, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void add_static_event(const sc_event &)
void remove_static_events()
virtual bool remove_child_event(sc_event *)
virtual void disable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
void remove_dynamic_events(bool skip_timeout=false)
sc_curr_proc_kind proc_kind() const
virtual void suspend_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
virtual void throw_user(const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
void trigger_reset_event()
friend SC_API sc_process_handle sc_get_current_process_handle()
virtual void add_child_object(sc_object *)
friend SC_API void sc_unsuspend_all()
virtual bool remove_child_object(sc_object *)
bool is_unwinding() const
const sc_event * m_event_p
std::vector< sc_reset * > m_resets
void set_last_report(sc_report *last_p)
sc_process_host * m_semantics_host_p
void reset_changed(bool async, bool asserted)
sc_curr_proc_kind m_process_kind
std::vector< const sc_event * > m_static_events