A counting semaphore class borrowing the native sem.  
 More...
#include <sem.hpp>
A counting semaphore class borrowing the native sem. 
Definition at line 264 of file sem.hpp.
◆ sem_ref() [1/3]
  
  |  | inlineexplicitconstexprnoexcept | 
 
Construct a sem using a native k_sem*. 
- Parameters
- 
  
    | s | The k_sem to use. s must already be initialized and will not be freed. |  
 
Definition at line 272 of file sem.hpp.
  275     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
 
◆ sem_ref() [2/3]
template<class T_Sem > 
  
  | 
        
          | constexpr zpp::sem_ref::sem_ref | ( | T_Sem & | s | ) |  |  | inlineexplicitconstexprnoexcept | 
 
Construct a sem using a native k_sem*. 
- Parameters
- 
  
    | s | The k_sem to use. s must already be initialized and will not be freed. |  
 
Definition at line 285 of file sem.hpp.
  286     : m_sem_ptr(s.native_handle())
 
  288     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
◆ sem_ref() [3/3]
  
  | 
        
          | zpp::sem_ref::sem_ref | ( |  | ) |  |  | delete | 
 
 
◆ native_handle() [1/2]
get the native zephyr sem handle. 
- Returns
- A pointer to the zephyr k_sem. 
Definition at line 339 of file sem.hpp.
  341     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
 
◆ native_handle() [2/2]
get the native zephyr sem handle. 
- Returns
- A pointer to the zephyr k_sem. 
Definition at line 327 of file sem.hpp.
  329     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
 
◆ operator=() [1/2]
Assign a sem using a native k_sem*. 
- Parameters
- 
  
    | s | The k_sem to use. s must already be initialized and will not be freed. |  
 
- Returns
- reference to this object 
Definition at line 299 of file sem.hpp.
  302     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
 
◆ operator=() [2/2]
template<class T_Sem > 
  
  | 
        
          | constexpr sem_ref& zpp::sem_ref::operator= | ( | T_Sem & | s | ) |  |  | inlineconstexprnoexcept | 
 
Assign a sem using another sem object. 
- Parameters
- 
  
    | s | The sem to use. s must already be initialized and will not be freed. |  
 
- Returns
- reference to this object 
Definition at line 315 of file sem.hpp.
  317     m_sem_ptr = s.native_handle();
 
  318     __ASSERT_NO_MSG(m_sem_ptr != 
nullptr);
 
 
 
 
The documentation for this class was generated from the following file: