mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[idd] common: use CSRWLock throughout the drivers
Make CSRWLock own the native lock and provide scoped guards for shared, exclusive, early-unlock, and non-blocking use. Replace direct SRW lock management throughout the IDD, input driver, and helper while preserving the existing lock scopes.
This commit is contained in:
@@ -179,7 +179,7 @@ void CLGMPInputTransport::PublishStatus()
|
||||
|
||||
bool CLGMPInputTransport::Start(IInputSink& sink)
|
||||
{
|
||||
CSRWExclusiveLock lock(&m_lifecycleLock);
|
||||
CSRWExclusiveLock lock(m_lifecycleLock);
|
||||
if (m_thread)
|
||||
{
|
||||
const DWORD state = WaitForSingleObject(m_thread, 0);
|
||||
@@ -249,7 +249,7 @@ bool CLGMPInputTransport::Start(IInputSink& sink)
|
||||
|
||||
void CLGMPInputTransport::Stop()
|
||||
{
|
||||
CSRWExclusiveLock lock(&m_lifecycleLock);
|
||||
CSRWExclusiveLock lock(m_lifecycleLock);
|
||||
|
||||
if (m_stopEvent)
|
||||
SetEvent(m_stopEvent);
|
||||
|
||||
Reference in New Issue
Block a user