Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Mar 2003 16:49:20 -0500
From:      "Brian F. Feldman" <green@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c 
Message-ID:  <200303042149.h24LnKSQ073292@green.bikeshed.org>
In-Reply-To: Your message of "Tue, 04 Mar 2003 13:32:25 PST." <200303042132.h24LWPrE064362@repoman.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb@FreeBSD.org> wrote:
> jhb         2003/03/04 13:32:25 PST
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/kern             kern_mutex.c 
>   Log:
>   Remove safety belt: it is now ok to do a mtx_trylock() on a mutex you
>   already own.  The mtx_trylock() will fail however.  Enhance the comment
>   at the top of the try lock function to explain this.
>   
>   Requested by:   jlemon and his evil netisr locking

I admit I've never actually had a use for mtx_trylock() but... wouldn't you 
like to detect it and assert against it if you're not expecting it?  If 
jlemon's behavior is the only one that relies on that part of the semantics, 
perhaps it should be another kind of mtx_trylock() call.  I guess the real 
question is just whether or not the assert would ever have done good for 
anyone while working.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



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




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