scc 2025.09
SystemC components library
scc::ordered_semaphore_t< CAPACITY > Struct Template Reference
Inheritance diagram for scc::ordered_semaphore_t< CAPACITY >:
Collaboration diagram for scc::ordered_semaphore_t< CAPACITY >:

Public Member Functions

 ordered_semaphore_t (const char *name_)
Public Member Functions inherited from scc::ordered_semaphore
 ordered_semaphore (unsigned init_value=1)
 constructor of an un-named semaphore
 ordered_semaphore (const char *name, unsigned init_value=1, bool value_traceable=false)
 ordered_semaphore (const ordered_semaphore &)=delete
ordered_semaphoreoperator= (const ordered_semaphore &)=delete
int wait () override
 lock (take) the semaphore, block if not available
int wait (unsigned priority)
int trywait () override
 lock (take) the semaphore, return -1 if not available
int post () override
 unlock (give) the semaphore
unsigned get_capacity ()
 retrieve the initial capacity of the semaphore
void set_capacity (unsigned capacity)
 change the capacity
int get_value () const override
 get the value of the semaphore
const char * kind () const override
 kind of this SastemC object
void trace (sc_core::sc_trace_file *tf) const override
 adds internal variables to trace
bool is_trace_enabled () const override
 returns of this component shall be traced

Additional Inherited Members

Protected Member Functions inherited from scc::ordered_semaphore
bool in_use ()
void report_error (const char *id, const char *add_msg=0) const
Protected Attributes inherited from scc::ordered_semaphore
sc_core::sc_event free_evt
int value
unsigned capacity
bool value_traceable = false
std::unique_ptr< scc::sc_ref_variable< int > > value_ref
std::array< std::deque< sc_core::sc_process_handle >, 2 > queue

Detailed Description

template<unsigned CAPACITY>
struct scc::ordered_semaphore_t< CAPACITY >

Definition at line 213 of file ordered_semaphore.h.

Constructor & Destructor Documentation

◆ ordered_semaphore_t() [1/2]

template<unsigned CAPACITY>
scc::ordered_semaphore_t< CAPACITY >::ordered_semaphore_t ( )
inlineexplicit

Definition at line 214 of file ordered_semaphore.h.

◆ ordered_semaphore_t() [2/2]

template<unsigned CAPACITY>
scc::ordered_semaphore_t< CAPACITY >::ordered_semaphore_t ( const char * name_)
inline

Definition at line 216 of file ordered_semaphore.h.


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