SystemC 3.0.0
Accellera SystemC proof-of-concept library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sc_core::sc_semaphore Class Reference

#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]

Public Member Functions

 sc_semaphore (int init_value_)
 
 sc_semaphore (const char *name_, int init_value_)
 
virtual int wait ()
 
virtual int trywait ()
 
virtual int post ()
 
virtual int get_value () const
 
virtual const char * kind () const
 
virtual int wait ()=0
 
virtual int trywait ()=0
 
virtual int post ()=0
 
virtual int get_value () const =0
 
- Public Member Functions inherited from sc_core::sc_interface
virtual void register_port (sc_port_base &port_, const char *if_typename_)
 
virtual const sc_eventdefault_event () const
 
virtual ~sc_interface ()
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () const
 
virtual void print (::std::ostream &os=::std::cout) const
 
virtual void dump (::std::ostream &os=::std::cout) const
 
virtual void trace (sc_trace_file *tf) const
 
virtual const char * kind () const
 
sc_simcontextsimcontext () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &name_)
 
const sc_attr_baseget_attribute (const std::string &name_) const
 
sc_attr_baseremove_attribute (const std::string &name_)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
sc_objectget_parent () const
 
sc_objectget_parent_object () const
 
virtual ~sc_object ()
 

Protected Member Functions

bool in_use () const
 
void report_error (const char *id, const char *add_msg=0) const
 
- Protected Member Functions inherited from sc_core::sc_semaphore_if
 sc_semaphore_if ()
 
- Protected Member Functions inherited from sc_core::sc_interface
 sc_interface ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *nm)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual hierarchy_scope get_hierarchy_scope ()
 

Protected Attributes

sc_event m_free
 
int m_value
 

Detailed Description

Definition at line 45 of file sc_semaphore.h.

Constructor & Destructor Documentation

◆ sc_semaphore() [1/2]

sc_core::sc_semaphore::sc_semaphore ( int  init_value_)
explicit

◆ sc_semaphore() [2/2]

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

Member Function Documentation

◆ get_value()

virtual int sc_core::sc_semaphore::get_value ( ) const
inlinevirtual

Implements sc_core::sc_semaphore_if.

Definition at line 69 of file sc_semaphore.h.

◆ in_use()

bool sc_core::sc_semaphore::in_use ( ) const
inlineprotected

Definition at line 79 of file sc_semaphore.h.

◆ kind()

virtual const char * sc_core::sc_semaphore::kind ( ) const
inlinevirtual

Reimplemented from sc_core::sc_object.

Definition at line 72 of file sc_semaphore.h.

◆ post()

virtual int sc_core::sc_semaphore::post ( )
virtual

◆ report_error()

void sc_core::sc_semaphore::report_error ( const char *  id,
const char *  add_msg = 0 
) const
protected

◆ trywait()

virtual int sc_core::sc_semaphore::trywait ( )
virtual

◆ wait()

virtual int sc_core::sc_semaphore::wait ( )
virtual

Member Data Documentation

◆ m_free

sc_event sc_core::sc_semaphore::m_free
protected

Definition at line 88 of file sc_semaphore.h.

◆ m_value

int sc_core::sc_semaphore::m_value
protected

Definition at line 89 of file sc_semaphore.h.


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