sc_core::sc_semaphore Class Reference

The sc_semaphore primitive channel class. More...

#include <sysc/communication/sc_semaphore.h>

Inheritance diagram for sc_core::sc_semaphore:
Inheritance graph
[legend]
Collaboration diagram for sc_core::sc_semaphore:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 sc_semaphore (int init_value_)
 sc_semaphore (const char *name_, int init_value_)
virtual int wait (int)
 A new parameter segment ID is added for the out-of-order simulation.
virtual int trywait ()
virtual int post ()
virtual int get_value () const
virtual const char * kind () const

Protected Member Functions

bool in_use () const
void report_error (const char *id, const char *add_msg=0) const

Protected Attributes

sc_event m_free
int m_value
CHNL_MTX_TYPE_ m_mutex
 A lock to protect concurrent communication through sc_semaphore.

Detailed Description

The sc_semaphore primitive channel class.

Definition at line 46 of file sc_semaphore.h.


Constructor & Destructor Documentation

sc_core::sc_semaphore::sc_semaphore ( int  init_value_  )  [explicit]
sc_core::sc_semaphore::sc_semaphore ( const char *  name_,
int  init_value_ 
)

Member Function Documentation

virtual int sc_core::sc_semaphore::get_value (  )  const [inline, virtual]

Implements sc_core::sc_semaphore_if.

Definition at line 76 of file sc_semaphore.h.

bool sc_core::sc_semaphore::in_use (  )  const [inline, protected]

Definition at line 92 of file sc_semaphore.h.

virtual const char* sc_core::sc_semaphore::kind (  )  const [inline, virtual]

Reimplemented from sc_core::sc_object.

Definition at line 85 of file sc_semaphore.h.

virtual int sc_core::sc_semaphore::post (  )  [virtual]
void sc_core::sc_semaphore::report_error ( const char *  id,
const char *  add_msg = 0 
) const [protected]
virtual int sc_core::sc_semaphore::trywait (  )  [virtual]
virtual int sc_core::sc_semaphore::wait ( int   )  [virtual]

A new parameter segment ID is added for the out-of-order simulation.

Implements sc_core::sc_semaphore_if.


Member Data Documentation

Definition at line 101 of file sc_semaphore.h.

CHNL_MTX_TYPE_ sc_core::sc_semaphore::m_mutex [mutable, protected]

A lock to protect concurrent communication through sc_semaphore.

Definition at line 108 of file sc_semaphore.h.

Definition at line 102 of file sc_semaphore.h.


The documentation for this class was generated from the following file:

Generated on 29 Oct 2015 for SystemC by  doxygen 1.6.1