Re: rwlock patch for bridge

From: John Baldwin <jhb_at_freebsd.org>
Date: Fri, 17 Feb 2006 13:42:11 -0500
On Wednesday 15 February 2006 16:15, Andrew Thompson wrote:
> Hi,
>
>
> Here is a patch that changes if_bridge to use rwlock(9) rather than the
> handrolled ref counting. Can I please get it reviewed to ensure I have
> the changes correct. I pondered if the order of unlocking the softc
> mutex and grabbing the rlock mattered but decided it didn't.
> It has passed a runtime test.
>
>
> cheers,
>
> Andrew

Have you thought about replacing both the mutex and ref-count with the single 
rwlock?  (Perhaps that is infeasible, but it would be somewhat pointless to 
just lock one lock so you can turn around and lock the next.)

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Fri Feb 17 2006 - 17:43:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC