Mixe for Privacy and Anonymity in the Internet
|
#include <atomicops.h>
Public Types | |
typedef std::make_signed< std::size_t >::type | ssize_t |
Public Member Functions | |
AE_NO_TSAN | LightweightSemaphore (ssize_t initialCount=0) |
bool | tryWait () AE_NO_TSAN |
void | wait () AE_NO_TSAN |
bool | wait (std::int64_t timeout_usecs) AE_NO_TSAN |
void | signal (ssize_t count=1) AE_NO_TSAN |
ssize_t | availableApprox () const AE_NO_TSAN |
Private Member Functions | |
bool | waitWithPartialSpinning (std::int64_t timeout_usecs=-1) AE_NO_TSAN |
Private Attributes | |
weak_atomic< ssize_t > | m_count |
Semaphore | m_sema |
Definition at line 564 of file atomicops.h.
typedef std::make_signed<std::size_t>::type spsc_sema::LightweightSemaphore::ssize_t |
Definition at line 567 of file atomicops.h.
|
inline |
Definition at line 617 of file atomicops.h.
|
inline |
Definition at line 654 of file atomicops.h.
References weak_atomic< T >::load(), and m_count.
|
inline |
Definition at line 643 of file atomicops.h.
References weak_atomic< T >::fetch_add_release(), m_count, and m_sema.
|
inline |
Definition at line 622 of file atomicops.h.
References weak_atomic< T >::fetch_add_acquire(), weak_atomic< T >::load(), and m_count.
Referenced by wait().
|
inline |
Definition at line 632 of file atomicops.h.
References tryWait(), and waitWithPartialSpinning().
|
inline |
Definition at line 638 of file atomicops.h.
References tryWait(), and waitWithPartialSpinning().
|
inlineprivate |
Definition at line 573 of file atomicops.h.
References compiler_fence(), weak_atomic< T >::fetch_add_acquire(), weak_atomic< T >::fetch_add_release(), weak_atomic< T >::load(), m_count, m_sema, and memory_order_acquire.
Referenced by wait().
|
private |
Definition at line 570 of file atomicops.h.
Referenced by availableApprox(), signal(), tryWait(), and waitWithPartialSpinning().
|
private |
Definition at line 571 of file atomicops.h.
Referenced by signal(), and waitWithPartialSpinning().