rc_semaphore Class Reference

#include <rc_semaphore.h>

Inheritance diagram for rc_semaphore:

sc_semaphore_if rc_prim_channel rc_resettable

List of all members.


Detailed Description

Resettable representation of sc_semaphore.

Definition at line 48 of file rc_semaphore.h.


Public Member Functions

 rc_semaphore (int value_)
 rc_semaphore (const char *name_, int value_)
virtual const char * kind () const
virtual int wait ()
virtual int trywait ()
virtual int post ()
virtual int get_value () const

Protected Member Functions

virtual void rc_on_reset ()
 Called to request the object for an immediate reset.

Protected Attributes

int m_value
int m_reset_value
sc_event m_free

Private Member Functions

 rc_semaphore (const rc_semaphore &other)
rc_semaphoreoperator= (const rc_semaphore &other)

Constructor & Destructor Documentation

rc_semaphore ( int  value_  )  [explicit]

Definition at line 41 of file rc_semaphore.cpp.

rc_semaphore ( const char *  name_,
int  value_ 
)

Definition at line 52 of file rc_semaphore.cpp.

rc_semaphore ( const rc_semaphore other  )  [private]


Member Function Documentation

virtual const char* kind (  )  const [inline, virtual]

Definition at line 58 of file rc_semaphore.h.

int wait (  )  [virtual]

Reimplemented from rc_prim_channel.

Definition at line 74 of file rc_semaphore.cpp.

int trywait (  )  [virtual]

Definition at line 83 of file rc_semaphore.cpp.

int post (  )  [virtual]

Definition at line 92 of file rc_semaphore.cpp.

virtual int get_value (  )  const [inline, virtual]

Definition at line 67 of file rc_semaphore.h.

void rc_on_reset (  )  [protected, virtual]

Called to request the object for an immediate reset.

rc_on_reset() is called every time a rc_reconfigurable is activated or deactivated during simulation phase, i.e. normally it will be called twice. An implementation is free to only reset itself either at activation or deactivation.

Attention:
An implementation of this method shall not invoke any wait statements.
Note:
Method should be declared to be "protected".

Implements rc_resettable.

Definition at line 62 of file rc_semaphore.cpp.

rc_semaphore& operator= ( const rc_semaphore other  )  [private]


Member Data Documentation

int m_value [protected]

Definition at line 76 of file rc_semaphore.h.

Referenced by rc_semaphore::get_value(), rc_semaphore::post(), rc_semaphore::rc_on_reset(), rc_semaphore::rc_semaphore(), rc_semaphore::trywait(), and rc_semaphore::wait().

int m_reset_value [protected]

Definition at line 77 of file rc_semaphore.h.

Referenced by rc_semaphore::rc_on_reset().

sc_event m_free [protected]

Definition at line 78 of file rc_semaphore.h.

Referenced by rc_semaphore::post(), rc_semaphore::rc_on_reset(), and rc_semaphore::wait().


The documentation for this class was generated from the following files:
Generated on Tue Jan 1 23:14:13 2008 for ReChannel by  doxygen 1.5.3