Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2000 21:53:19 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        mjacob@feral.com
Cc:        Brian Somers <brian@Awfulhak.org>, Greg Lehey <grog@wantadilla.lemis.com>, Chuck Paterson <cp@bsdi.com>, Archie Cobbs <archie@whistle.com>, Joerg Micheel <joerg@cs.waikato.ac.nz>, Frank Mayhar <frank@exit.com>, John Baldwin <jhb@pike.osd.bsdi.com>, Mark Murray <markm@FreeBSD.org>, FreeBSD-arch@FreeBSD.org, brian@Awfulhak.org
Subject:   Re: Mutexes and semaphores (was: cvs commit: src/sys/conf files src/sys/sys random.h src/sys/dev/randomdev hash.c hash.h harvest.c randomdev.c yarrow.c yarro) 
Message-ID:  <200009242053.e8OKrJx29096@hak.lan.Awfulhak.org>
In-Reply-To: Message from Matthew Jacob <mjacob@feral.com>  of "Sun, 24 Sep 2000 09:37:27 PDT." <Pine.GSO.4.21.0009240936050.8550-100000@bird.feral.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > I agree - the idea of recursive mutices evil and should go, but the 
> > idea of an owner should not.  It's nice to be able to write code that 
> > KASSERTs that it already owns a given mutex.
> 
> I'm  not sure I agree. Having lived through Solaris hell with recursive mutex
> panics, I rather like the BSD/OS approach.
> 
> Yes, possibly allows for sloppy coding. If you get rid of this, though, you
> can extend the switchover and pain for SMP at least a year.

Maybe a whinge rather than an ASSERT in the mutex code would be more 
appropriate.  I've had recursive mutex panics in Solaris, and it 
meant I was doing something wrong.  A panic was a bit harsh, but it 
still led me to note that I was misusing the kstat stuff and made me 
fix my code - something I wouldn't have done if it wasn't pointed out 
for me.

> -matt

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !




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




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