Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2008 09:25:58 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        "Attilio Rao" <attilio@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c
Message-ID:  <200802140925.58430.jhb@freebsd.org>
In-Reply-To: <3bbf2fe10802131616p53b2bae2ma4bccef2d8c8fb76@mail.gmail.com>
References:  <200802132333.m1DNXokI060695@repoman.freebsd.org> <3bbf2fe10802131616p53b2bae2ma4bccef2d8c8fb76@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 13 February 2008 07:16:11 pm Attilio Rao wrote:
> 2008/2/14, John Baldwin <jhb@freebsd.org>:
> > jhb         2008-02-13 23:33:50 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/kern             kern_mutex.c
> >   Log:
> >   Add a couple of assertions and KTR logging to thread_lock_flags() to
> >   match mtx_lock_spin_flags().
> 
> As I tried to pointed out in perforce, it would not be better to check
> against LC_SPINLOCK (and lc_flags) instead than direct comparisons
> with lock_class_mtx_spin ?

In this case, no, as if we had a foo lock that was a spin lock,
mtx_lock_spin() and thread_lock() would still be wrong.  They truly only
operate on MTX_SPIN mutexes.

-- 
John Baldwin



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