mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +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:
@@ -26,6 +26,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "CPipeEndpoint.h"
|
||||
#include "CSRWLock.h"
|
||||
#include "PipeMsg.h"
|
||||
|
||||
class CDeviceContext;
|
||||
@@ -34,10 +35,10 @@ class CPipeServer : private IPipeEndpointHandler
|
||||
{
|
||||
private:
|
||||
CPipeEndpoint m_endpoint;
|
||||
SRWLOCK m_queueLock = SRWLOCK_INIT;
|
||||
CSRWLock m_queueLock;
|
||||
std::vector<LGPipeMsg> m_queue;
|
||||
|
||||
SRWLOCK m_deviceContextLock = SRWLOCK_INIT;
|
||||
CSRWLock m_deviceContextLock;
|
||||
CDeviceContext * m_deviceContext = nullptr;
|
||||
|
||||
void WriteMsg(const LGPipeMsg & msg);
|
||||
|
||||
Reference in New Issue
Block a user