tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Bug in mutex_owned() ?
Hi,
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!
822 int
823 mutex_owned(kmutex_t *mtx)
824 {
825
826 if (mtx == NULL)
827 return 0;
828 if (MUTEX_ADAPTIVE_P(mtx))
829 return MUTEX_OWNER(mtx->mtx_owner) == (uintptr_t)curlwp;
830 #ifdef FULL
831 return __SIMPLELOCK_LOCKED_P(&mtx->mtx_lock);
832 #else
833 return 1;
834 #endif
835 }
--HPS
Home |
Main Index |
Thread Index |
Old Index