The sc_semaphore primitive channel class. More...
#include <sysc/communication/sc_semaphore.h>
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. |
The sc_semaphore primitive channel class.
Definition at line 46 of file sc_semaphore.h.
sc_core::sc_semaphore::sc_semaphore | ( | int | init_value_ | ) | [explicit] |
sc_core::sc_semaphore::sc_semaphore | ( | const char * | name_, | |
int | init_value_ | |||
) |
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] |
Implements sc_core::sc_semaphore_if.
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] |
Implements sc_core::sc_semaphore_if.
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.
sc_event sc_core::sc_semaphore::m_free [protected] |
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.
int sc_core::sc_semaphore::m_value [protected] |
Definition at line 102 of file sc_semaphore.h.