36 #include "StdCriticalSectionInternal.h"
57 while (m_iBusy.exchange(Locked, boost::memory_order_acquire) == Locked)
66 while (
m_iBusy.exchange(Locked, std::memory_order_acquire) == Locked)
86 m_iBusy.exchange(Unlocked, boost::memory_order_acquire);
88 m_iBusy.exchange(Unlocked, std::memory_order_acquire);
144 m_dwOwner = boost::this_thread::get_id();
149 else if (m_dwOwner == boost::this_thread::get_id())
190 if(lMilliTimeout > 0 && lTotal >= lMilliTimeout)
217 if (m_dwOwner == boost::this_thread::get_id())
~CStdCriticalSectionInternal()
Destructor.
ULONG m_ulRefCnt
The number of reference counts to this critical section.
Declares the standard critical section class.
CStdCriticalSectionInternal()
Default constructor.
bool TryEnter()
Gets the try enter.
std::atomic< int > & m_iBusy
Tells if this is busy.
bool Leave()
Leaves this critical section.
std::atomic< int > m_iBusy
Tells if this critical section is currently being used.
Namespace for the standard utility objects.
InternalLocker()
Default constructor.
~InternalLocker()
Finaliser.
bool Enter(long lMilliTimeout=-1)
Try's to enter the critical section. Waits until it can get in, or until timeout. ...