[wdmaudiodev] DMusUart IMXF::PutMessage and IAllocatorMXF::GetMessage while holding spinlock?

  • From: "Tobias Erichsen" <t.erichsen@xxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 15 Aug 2010 12:52:36 +0200

Hi everyone,

I have recently encountered a deadlock in my virtual MIDI-driver when
running multiple instances
of my derivation of CMiniportDMusUart at the same time on Windows XP.

I have reevaluated my code and I have gone through all the prior messages on
this mailing-list to
find if I did anything that is not considered "fair use".

Doing this I noticed two things that take place in my code (and since this
code is based on the
DMusUart and MPU401 samples, at least one of those is also in the DDK sample
code!)

In the DMUSUart sample I find the usage of IAllocatorMXF::PutMessage()
within the method
CMiniportDMusUARTStream::ConsumeEvents() while the method holds the
DPCSpinlock.

As I pretty much used this code in my own framework,  I'm a little worried
whether this is
acceptable.

In my derived version of CMiniportDMusUARTStream::SourceEvtsToPort(), I was
wondering if it
is possible to use IAllocatorMXF::GetMessage() and later on also
IAllocatorMXF::PutMessage()
while holding a lock.

I would really like to get a clarification on this subject by Microsoft (and
also if the
behaviour is different between the different OS-versions), since it seems
that in the past
this subject has come up again & again...

Best regards,
Tobias

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts:

  • » [wdmaudiodev] DMusUart IMXF::PutMessage and IAllocatorMXF::GetMessage while holding spinlock? - Tobias Erichsen