Skip to content

Commit 43d3570

Browse files
Removing MUTEX Use
Removing Mutex use in not allowed driver areas. Code cleanup.
1 parent dac2c03 commit 43d3570

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/api/Drivers/USBMIDI2/Driver/StreamEngine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Return Value:
298298

299299
// Current mechanism to determine if currently processing data is that
300300
// the StreamEngine is not null. TBD this mechanism needs to be fixed.
301-
auto lock = m_MidiInLock.acquire();
301+
//auto lock = m_MidiInLock.acquire();
302302

303303
if (m_IsRunning)
304304
{
@@ -579,7 +579,7 @@ StreamEngine::Run()
579579
{
580580
// m_IsRunning is used to indicate running state. If m_IsRunning true, the out worker
581581
// thread will output data to the connected device, otherwise data will be thrown away.
582-
auto lock = m_MidiInLock.acquire();
582+
//auto lock = m_MidiInLock.acquire();
583583

584584
WDFDEVICE devCtx = AcxCircuitGetWdfDevice(AcxPinGetCircuit(m_Pin));
585585
PDEVICE_CONTEXT pDevCtx = GetDeviceContext(devCtx);

src/api/Drivers/USBMIDI2/Driver/StreamEngine.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ class StreamEngine
235235
wil::kernel_event_auto_reset m_ThreadExitEvent;
236236
wil::kernel_event_manual_reset m_ThreadExitedEvent {true};
237237

238-
// m_StandardStreamingLock m_LoopbackMessageQueue are only used
239238
// for standard streaming of loopback messages
240-
wil::fast_mutex_with_critical_region m_StandardStreamingLock;
241239
wil::fast_mutex_with_critical_region m_MidiInLock;
242240
LIST_ENTRY m_LoopbackMessageQueue {nullptr};
243241
};

0 commit comments

Comments
 (0)