tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bug in mutex_owned() ?

Hans Petter Selasky <> wrote:
> I've currently defined a spinlock type of mutex and my I4B driver code 
> repeatedly crashes due to the fact that mutex_owned() returnes that the
> mutex is owned while it is actually not. It looks like a bug to me that 
> mutex_owned() always returns (1) in the non-adaptive case!

That is not a bug.  Please see "FULL" definition.  Perhaps you are using
it not for diagnostic purposes?  In such case, it is wrong.

>   830 #ifdef FULL
>   831         return __SIMPLELOCK_LOCKED_P(&mtx->mtx_lock);
>   832 #else
>   833         return 1;
>   834 #endif
>   835 }


Home | Main Index | Thread Index | Old Index