[wdmaudiodev] Re: Calling routines from interrupt...

  • From: "David A. Hoatson" <dhoatson@xxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 12 Dec 2003 07:10:40 -0800

Hello,

It is best not to make any calls other than what the documentation says you
can do.  Just had a phone call yesterday from a developer that couldn't
figure out why his application would hang when calling waveOutWrite from
his callback function... reentrancy was the problem.

Unless you are writing both ends of the function you are calling (say, the
device driver that is getting the DeviceIOControl), it simply isn't safe to
make these calls because you may end up causing a dead-lock when using some
other piece of hardware/software.

David A. Hoatson

----- Original Message ----- 
From: "Dave Gamble" <signalzerodb@xxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Friday, December 12, 2003 6:28 AM
Subject: [wdmaudiodev] Calling routines from interrupt...


> Hey,
>
> Writing a USB-MIDI driver (via MME rather than DMus)...
>
> The only real documentation I can find for doing this comes from the
> 98SDK... in which it states that the modMessage function can get called
> at interrupt time... So, it has to be reentrant, but also, has only a
> restricted set of functions which it can safely call...
>
> But is that /quite/ true...?
>
> I've been led to believe that it's perfectly safe to call some
> functions other than those listed in the docs (i can provide the list
> if required).
> For instance (and of particular relevance), I'm told that one can call
> DeviceIOControl in a modMessage function, and no ill will come of it...
>
> If this /is/ true, then can one go the whole way, and use ReadFile and
> WriteFile within a modMessage routine?
>
> Does anyone have any further information on this?
>
> Cheers!
>
> Dave.
>
> ******************
>
> 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.de/
>
>


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

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.de/

Other related posts: