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

sc_mutex Class Reference

#include <sc_mutex.h>

Inheritance diagram for sc_mutex:

Inheritance graph
[legend]
Collaboration diagram for sc_mutex:

Collaboration graph
[legend]
List of all members.

Public Methods

 sc_mutex ()
 sc_mutex (const char *name_)
virtual int lock ()
virtual int trylock ()
virtual int unlock ()
virtual const char * kind () const

Protected Methods

bool in_use () const

Protected Attributes

sc_process_bm_owner
sc_event m_free

Constructor & Destructor Documentation

sc_mutex::sc_mutex  
 

Definition at line 49 of file sc_mutex.cpp.

sc_mutex::sc_mutex const char *    name_ [explicit]
 

Definition at line 54 of file sc_mutex.cpp.


Member Function Documentation

bool sc_mutex::in_use   const [inline, protected]
 

Definition at line 80 of file sc_mutex.h.

References m_owner.

Referenced by lock(), and trylock().

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

Reimplemented from sc_prim_channel.

Definition at line 73 of file sc_mutex.h.

int sc_mutex::lock   [virtual]
 

Implements sc_mutex_if.

Definition at line 65 of file sc_mutex.cpp.

References in_use(), m_free, m_owner, sc_get_curr_process_handle(), and sc_prim_channel::wait().

int sc_mutex::trylock   [virtual]
 

Implements sc_mutex_if.

Definition at line 78 of file sc_mutex.cpp.

References in_use(), m_owner, and sc_get_curr_process_handle().

int sc_mutex::unlock   [virtual]
 

Implements sc_mutex_if.

Definition at line 91 of file sc_mutex.cpp.

References m_free, m_owner, sc_event::notify(), and sc_get_curr_process_handle().


Member Data Documentation

sc_event sc_mutex::m_free [protected]
 

Definition at line 86 of file sc_mutex.h.

Referenced by lock(), and unlock().

sc_process_b* sc_mutex::m_owner [protected]
 

Definition at line 85 of file sc_mutex.h.

Referenced by in_use(), lock(), trylock(), and unlock().


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