Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
moodycamel::spsc_sema::LightweightSemaphore Class Reference

#include <atomicops.h>

Public Types

typedef std::make_signed< std::size_t >::type ssize_t
 

Public Member Functions

ssize_t availableApprox () const AE_NO_TSAN
 
AE_NO_TSAN LightweightSemaphore (ssize_t initialCount=0)
 
void signal (ssize_t count=1) AE_NO_TSAN
 
bool tryWait () AE_NO_TSAN
 
bool wait () AE_NO_TSAN
 
bool wait (std::int64_t timeout_usecs) AE_NO_TSAN
 

Private Member Functions

bool waitWithPartialSpinning (std::int64_t timeout_usecs=-1) AE_NO_TSAN
 

Private Attributes

weak_atomic< ssize_tm_count
 
Semaphore m_sema
 

Detailed Description

Definition at line 655 of file atomicops.h.

Member Typedef Documentation

◆ ssize_t

typedef std::make_signed<std::size_t>::type moodycamel::spsc_sema::LightweightSemaphore::ssize_t

Definition at line 658 of file atomicops.h.

Constructor & Destructor Documentation

◆ LightweightSemaphore()

AE_NO_TSAN moodycamel::spsc_sema::LightweightSemaphore::LightweightSemaphore ( ssize_t  initialCount = 0)
inline

Definition at line 705 of file atomicops.h.

Member Function Documentation

◆ availableApprox()

ssize_t moodycamel::spsc_sema::LightweightSemaphore::availableApprox ( ) const
inline

Definition at line 741 of file atomicops.h.

◆ signal()

void moodycamel::spsc_sema::LightweightSemaphore::signal ( ssize_t  count = 1)
inline

Definition at line 730 of file atomicops.h.

◆ tryWait()

bool moodycamel::spsc_sema::LightweightSemaphore::tryWait ( )
inline

Definition at line 710 of file atomicops.h.

◆ wait() [1/2]

bool moodycamel::spsc_sema::LightweightSemaphore::wait ( )
inline

Definition at line 720 of file atomicops.h.

◆ wait() [2/2]

bool moodycamel::spsc_sema::LightweightSemaphore::wait ( std::int64_t  timeout_usecs)
inline

Definition at line 725 of file atomicops.h.

◆ waitWithPartialSpinning()

bool moodycamel::spsc_sema::LightweightSemaphore::waitWithPartialSpinning ( std::int64_t  timeout_usecs = -1)
inlineprivate

Definition at line 664 of file atomicops.h.

Member Data Documentation

◆ m_count

weak_atomic<ssize_t> moodycamel::spsc_sema::LightweightSemaphore::m_count
private

Definition at line 661 of file atomicops.h.

◆ m_sema

Semaphore moodycamel::spsc_sema::LightweightSemaphore::m_sema
private

Definition at line 662 of file atomicops.h.


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


pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35