_API_Mutex_Lock and interrupts

Jay Monkman jtm at smoothsmoothie.com
Thu Jul 18 16:29:13 UTC 2002

I just tried updating to the 20020717 snapshot, and am getting funny
problems. I'm not sure but it looks like the source is

    #define _API_Mutex_Lock( _the_mutex ) \
    do { \
       ISR_Level _level;  \
       _CORE_mutex_Seize( \
       &(_the_mutex)->Mutex, (_the_mutex)->Object.id, TRUE, 0, (_level)); \
    } while (0)

_CORE_mutex_Seize starts with:
    #define _CORE_mutex_Seize( \
        _the_mutex, _id, _wait, _timeout, _level ) \
    do { \
        if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &_level ) )

And _CORE_mutex_Seize_interrupt_trylock makes several calls to

But, _level never gets initialized as far as I can see. Am I missing
something, or is the code wrong?

Jay Monkman	    The truth knocks on the door and you say "Go away, I'm 
                    looking for the truth," and so it goes away. Puzzling.
		     - from _Zen_and_the_Art_of_Motorcycle_Maintenance_

More information about the users mailing list