4.6.20 mutex_owned

int mutex_owned(kmutex_t *mutex)

mutex_owned returns non-zero if the calling thread currently holds the specified kernel mutex, or zero if the specified adaptive mutex is currently unowned.