Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_thread_process Class Reference

#include <sc_process_int.h>

Inheritance diagram for sc_thread_process:

Inheritance graph
[legend]
Collaboration diagram for sc_thread_process:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * kind () const
void add_monitor (sc_process_monitor *monitor_p)
void remove_monitor (sc_process_monitor *monitor_p)
void signal_monitors (int type=0)

Protected Methods

 sc_thread_process (const char *nm, SC_ENTRY_FUNC fn, sc_process_host *host)
virtual ~sc_thread_process ()
void set_stack_size (size_t size)
virtual void prepare_for_simulation ()
virtual bool ready_to_run ()
void wait (const sc_event &)
void wait (sc_event_or_list &)
void wait (sc_event_and_list &)
void wait (const sc_time &)
void wait (const sc_time &, const sc_event &)
void wait (const sc_time &, sc_event_or_list &)
void wait (const sc_time &, sc_event_and_list &)
bool trigger_dynamic (sc_event *)
void set_next_exist (sc_thread_handle next_p)
sc_thread_handle next_exist ()
void set_next_runnable (sc_thread_handle next_p)
sc_thread_handle next_runnable ()

Protected Attributes

size_t m_stack_size
sc_corm_cor
sc_pvector< sc_process_monitor * > m_monitor_q

Friends

class sc_event
class sc_module
class sc_process_table
class sc_simcontext
class sc_runnable
void wait (const sc_event &, sc_simcontext *)
void wait (sc_event_or_list &, sc_simcontext *)
void wait (sc_event_and_list &, sc_simcontext *)
void wait (const sc_time &, sc_simcontext *)
void wait (const sc_time &, const sc_event &, sc_simcontext *)
void wait (const sc_time &, sc_event_or_list &, sc_simcontext *)
void wait (const sc_time &, sc_event_and_list &, sc_simcontext *)
void sc_thread_cor_fn (void *)
void sc_cthread_cor_fn (void *)
void sc_set_stack_size (sc_thread_handle, size_t)

Constructor & Destructor Documentation

sc_thread_process::sc_thread_process const char *    nm,
SC_ENTRY_FUNC    fn,
sc_process_host   host
[protected]
 

Definition at line 384 of file sc_process_int.cpp.

References sc_process_b::do_initialize(), sc_process_b::is_cthread(), SC_DEFAULT_STACK_SIZE, and SC_ENTRY_FUNC.

sc_thread_process::~sc_thread_process   [protected, virtual]
 

Definition at line 402 of file sc_process_int.cpp.

References sc_event_list::auto_delete(), sc_process_b::entry_fn, m_cor, sc_process_b::m_event, sc_process_b::m_event_list, sc_event_list::remove_dynamic(), sc_event::remove_dynamic(), sc_process_b::remove_static_events(), SC_DEFUNCT_PROCESS_FUNCTION, and sc_cor::stack_protect().


Member Function Documentation

void sc_thread_process::add_monitor sc_process_monitor   monitor_p [inline]
 

Definition at line 468 of file sc_process_int.h.

References m_monitor_q, and sc_pvector< sc_process_monitor * >::push_back().

Referenced by sc_join::add_process(), and sc_process_base::sc_process_base().

virtual const char* sc_thread_process::kind   const [inline, virtual]
 

Reimplemented from sc_process_b.

Reimplemented in sc_cthread_process.

Definition at line 318 of file sc_process_int.h.

sc_thread_handle sc_thread_process::next_exist   [inline, protected]
 

Definition at line 496 of file sc_process_int.h.

References sc_process_b::m_exist_p.

Referenced by sc_simcontext::prepare_to_simulate(), sc_process_table::remove(), and sc_process_table::~sc_process_table().

sc_thread_handle sc_thread_process::next_runnable   [inline, protected]
 

Definition at line 508 of file sc_process_int.h.

References sc_process_b::m_runnable_p.

Referenced by sc_runnable::is_empty(), sc_runnable::pop_thread(), sc_runnable::push_front_thread(), sc_runnable::remove_thread(), and sc_runnable::toggle().

void sc_thread_process::prepare_for_simulation   [protected, virtual]
 

Definition at line 427 of file sc_process_int.cpp.

References sc_simcontext::cor_pkg(), sc_cor_pkg::create(), m_cor, m_stack_size, sc_thread_cor_fn, sc_object::simcontext(), and sc_cor::stack_protect().

Referenced by sc_simcontext::create_dynamic_thread_process(), and sc_simcontext::prepare_to_simulate().

bool sc_thread_process::ready_to_run   [inline, protected, virtual]
 

Definition at line 384 of file sc_process_int.h.

Referenced by sc_simcontext::next_cor().

void sc_thread_process::remove_monitor sc_process_monitor   monitor_p [inline]
 

Definition at line 475 of file sc_process_int.h.

References sc_pvector< sc_process_monitor * >::decr_count(), m_monitor_q, and sc_pvector< sc_process_monitor * >::size().

Referenced by sc_join::signal().

void sc_thread_process::set_next_exist sc_thread_handle    next_p [inline, protected]
 

Definition at line 490 of file sc_process_int.h.

References sc_process_b::m_exist_p.

Referenced by sc_process_table::push_front(), and sc_process_table::remove().

void sc_thread_process::set_next_runnable sc_thread_handle    next_p [inline, protected]
 

Definition at line 502 of file sc_process_int.h.

References sc_process_b::m_runnable_p.

Referenced by sc_runnable::init(), sc_runnable::pop_thread(), sc_runnable::push_back_thread(), sc_runnable::push_front_thread(), sc_runnable::remove_thread(), and sc_runnable::toggle().

void sc_thread_process::set_stack_size size_t    size [protected]
 

Definition at line 420 of file sc_process_int.cpp.

References m_stack_size.

Referenced by sc_simcontext::create_dynamic_thread_process(), sc_set_stack_size(), and sc_module::set_stack_size().

void sc_thread_process::signal_monitors int    type = 0
 

Definition at line 471 of file sc_process_int.cpp.

References m_monitor_q, and sc_pvector< sc_process_monitor * >::size().

bool sc_thread_process::trigger_dynamic sc_event   [protected]
 

Definition at line 481 of file sc_process_int.cpp.

References sc_process_b::AND_LIST, sc_process_b::AND_LIST_TIMEOUT, assert, sc_event_list::auto_delete(), sc_event::cancel(), sc_process_b::EVENT, sc_process_b::EVENT_TIMEOUT, sc_process_b::is_runnable(), sc_process_b::m_event, sc_process_b::m_event_count, sc_process_b::m_event_list, sc_process_b::m_timed_out, sc_process_b::m_timeout_event, sc_process_b::m_trigger_type, sc_process_b::OR_LIST, sc_process_b::OR_LIST_TIMEOUT, sc_event::remove_dynamic(), sc_event_list::remove_dynamic(), sc_event::reset(), sc_process_b::STATIC, and sc_process_b::TIMEOUT.

void sc_thread_process::wait const sc_time  ,
sc_event_and_list  
[inline, protected]
 

Definition at line 456 of file sc_process_int.h.

References sc_event_list::add_dynamic(), sc_event::add_dynamic(), sc_process_b::AND_LIST_TIMEOUT, sc_process_b::m_event_count, sc_process_b::m_event_list, sc_process_b::m_timeout_event, sc_process_b::m_trigger_type, sc_event::notify_delayed(), sc_switch_thread(), sc_object::simcontext(), and sc_event_list::size().

void sc_thread_process::wait const sc_time  ,
sc_event_or_list  
[inline, protected]
 

Definition at line 444 of file sc_process_int.h.

References sc_event_list::add_dynamic(), sc_event::add_dynamic(), sc_process_b::m_event_list, sc_process_b::m_timeout_event, sc_process_b::m_trigger_type, sc_event::notify_delayed(), sc_process_b::OR_LIST_TIMEOUT, sc_switch_thread(), and sc_object::simcontext().

void sc_thread_process::wait const sc_time  ,
const sc_event  
[inline, protected]
 

Definition at line 432 of file sc_process_int.h.

References sc_event::add_dynamic(), sc_process_b::EVENT_TIMEOUT, sc_process_b::m_event, sc_process_b::m_timeout_event, sc_process_b::m_trigger_type, sc_event::notify_delayed(), sc_switch_thread(), and sc_object::simcontext().

void sc_thread_process::wait const sc_time   [inline, protected]
 

Definition at line 422 of file sc_process_int.h.

References sc_event::add_dynamic(), sc_process_b::m_timeout_event, sc_process_b::m_trigger_type, sc_event::notify_delayed(), sc_switch_thread(), sc_object::simcontext(), and sc_process_b::TIMEOUT.

void sc_thread_process::wait sc_event_and_list   [inline, protected]
 

Definition at line 411 of file sc_process_int.h.

References sc_event_list::add_dynamic(), sc_process_b::AND_LIST, sc_process_b::m_event_count, sc_process_b::m_event_list, sc_process_b::m_trigger_type, sc_switch_thread(), sc_object::simcontext(), and sc_event_list::size().

void sc_thread_process::wait sc_event_or_list   [inline, protected]
 

Definition at line 401 of file sc_process_int.h.

References sc_event_list::add_dynamic(), sc_process_b::m_event_list, sc_process_b::m_trigger_type, sc_process_b::OR_LIST, sc_switch_thread(), and sc_object::simcontext().

void sc_thread_process::wait const sc_event   [inline, protected]
 

Definition at line 392 of file sc_process_int.h.

References sc_event::add_dynamic(), sc_process_b::EVENT, sc_process_b::m_trigger_type, sc_switch_thread(), and sc_object::simcontext().


Friends And Related Function Documentation

void sc_cthread_cor_fn void *    arg [friend]
 

Reimplemented in sc_cthread_process.

Definition at line 647 of file sc_process_int.cpp.

friend class sc_event [friend]
 

Definition at line 295 of file sc_process_int.h.

friend class sc_module [friend]
 

Reimplemented from sc_process_b.

Reimplemented in sc_cthread_process.

Definition at line 296 of file sc_process_int.h.

friend class sc_process_table [friend]
 

Reimplemented in sc_cthread_process.

Definition at line 297 of file sc_process_int.h.

friend class sc_runnable [friend]
 

Reimplemented from sc_process_b.

Definition at line 299 of file sc_process_int.h.

void sc_set_stack_size sc_thread_handle    thread_h,
size_t    size
[friend]
 

Definition at line 567 of file sc_process_int.cpp.

friend class sc_simcontext [friend]
 

Reimplemented in sc_cthread_process.

Definition at line 298 of file sc_process_int.h.

void sc_thread_cor_fn void *    arg [friend]
 

Definition at line 436 of file sc_process_int.cpp.

Referenced by prepare_for_simulation().

void wait const sc_time  ,
sc_event_and_list  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 209 of file sc_wait.cpp.

void wait const sc_time  ,
sc_event_or_list  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 186 of file sc_wait.cpp.

void wait const sc_time  ,
const sc_event  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 163 of file sc_wait.cpp.

void wait const sc_time  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 140 of file sc_wait.cpp.

void wait sc_event_and_list  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 117 of file sc_wait.cpp.

void wait sc_event_or_list  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 94 of file sc_wait.cpp.

void wait const sc_event  ,
sc_simcontext  
[friend]
 

Reimplemented in sc_cthread_process.

Definition at line 71 of file sc_wait.cpp.


Member Data Documentation

sc_cor* sc_thread_process::m_cor [protected]
 

Definition at line 364 of file sc_process_int.h.

Referenced by sc_simcontext::next_cor(), prepare_for_simulation(), and ~sc_thread_process().

sc_pvector<sc_process_monitor*> sc_thread_process::m_monitor_q [protected]
 

Definition at line 365 of file sc_process_int.h.

Referenced by add_monitor(), remove_monitor(), sc_cthread_cor_fn(), sc_thread_cor_fn(), and signal_monitors().

size_t sc_thread_process::m_stack_size [protected]
 

Definition at line 363 of file sc_process_int.h.

Referenced by prepare_for_simulation(), and set_stack_size().


The documentation for this class was generated from the following files:
Generated on Fri Jan 14 08:32:13 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18