Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::UnfairSharedSpinMutex< TReaders, TBackoff > Class Template Reference

A unfair reader-writer spin mutex. More...

#include <SpinMutex.h>

Public Types

using backoff_type = TBackoff
 
using mutex_type = UnfairSpinMutex< backoff_type >
 

Public Member Functions

GTS_INLINE UnfairSharedSpinMutex (UnfairSharedSpinMutex &&other)
 
GTS_INLINE UnfairSharedSpinMutexoperator= (UnfairSharedSpinMutex &&other)
 
GTS_INLINE bool try_lock ()
 
GTS_INLINE void lock ()
 
GTS_INLINE void downgrade ()
 
GTS_INLINE void unlock ()
 
GTS_INLINE bool try_lock_shared ()
 
GTS_INLINE void lock_shared ()
 
GTS_INLINE void unlock_shared ()
 
GTS_INLINE bool isLocked () const
 

Detailed Description

template<typename TReaders = uint8_t, typename TBackoff = Backoff<BackoffGrowth::Geometric, true>>
class gts::UnfairSharedSpinMutex< TReaders, TBackoff >

A unfair reader-writer spin mutex.