cvs commit: src/sys/kern kern_mutex.c

John Baldwin jhb at freebsd.org
Thu Feb 14 07:49:00 PST 2008


On Wednesday 13 February 2008 07:16:11 pm Attilio Rao wrote:
> 2008/2/14, John Baldwin <jhb at 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


More information about the cvs-src mailing list