Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Sep 2002 11:10:13 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c
Message-ID:  <XFMail.20020909111013.jhb@FreeBSD.org>
In-Reply-To: <20020908044114.GF12935@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 08-Sep-2002 Greg 'groggy' Lehey wrote:
> On Tuesday,  3 September 2002 at 11:25:16 -0700, John Baldwin wrote:
>> jhb         2002/09/03 11:25:16 PDT
>>
>>   Modified files:
>>     sys/kern             kern_mutex.c
>>   Log:
>>   Add some KASSERT()'s to ensure that we don't perform spin mutex ops on
>>   sleep mutexes and vice versa.  WITNESS normally should catch this but
>>   not everyone uses WITNESS so this is a fallback to catch nasty but easy
>>   to do bugs.
> 
> Is this a temporary thing which will go away, or is it dependent on
> some other debugging option?  It doesn't seem to be something that
> should remain in production systems for ever.

Hmm, well, for developer's it is very useful.  WITNESS unfortunately
doesn't seem to catch the cases when it happens  (I think the damage is
usually done too late by that point).  ATM it is just a simple ==
comparison with perhaps two pointer dereferences, not really a very
expensive check.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020909111013.jhb>