Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2007 19:09:22 +0100
From:      "Attilio Rao" <attilio@freebsd.org>
To:        "Robert Watson" <rwatson@freebsd.org>
Cc:        Stephan Uphoff <ups@freebsd.org>, Max Laier <max@love2party.net>, Alfred Perlstein <alfred@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: rwlocks, correctness over speed.
Message-ID:  <3bbf2fe10711241009g126e8bd1ldca2468e7956c902@mail.gmail.com>
In-Reply-To: <20071124162322.V14018@fledge.watson.org>
References:  <20071121222319.GX44563@elvis.mu.org> <20071123082339.GN44563@elvis.mu.org> <47469328.8020404@freebsd.org> <20071123092415.GP44563@elvis.mu.org> <4746F858.4070301@freebsd.org> <20071123235346.E14018@fledge.watson.org> <3bbf2fe10711231930m459dc800wbbb894b9fd50ca13@mail.gmail.com> <20071124103231.A14018@fledge.watson.org> <3bbf2fe10711240553k1eb35a5au23cae8af08f5864c@mail.gmail.com> <20071124162322.V14018@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/11/24, Robert Watson <rwatson@freebsd.org>:
> On Sat, 24 Nov 2007, Attilio Rao wrote:
>
> >> I must have missed recursion arriving then -- I'll modify uipc_usrreq.c to
> >> set the recursion flag on the rwlock in UNIX domain sockets rather than
> >> doing the nasty hack that was previously required.  At the time, the hack
> >> was added because it seemed recursion was not going to be added to rwlocks,
> >> but sonewconn() behavior for listen sockets really ended up requiring it.
> >
> > attilio     2007-06-26 21:31:56 UTC
> >
> > FreeBSD src repository
> >
> > Modified files:
> >   sys/kern             kern_rwlock.c
> >   sys/sys              _rwlock.h rwlock.h
> > Log:
> > Introduce a new rwlocks initialization function: rw_init_flags.
> > This is very similar to sx_init_flags: it initializes the rwlock using
> > special flags passed as third argument (RW_DUPOK, RW_NOPROFILE,
> > RW_NOWITNESS, RW_QUIET, RW_RECURSE).
> > Among these, the most important new feature is probabilly that rwlocks
> > can be acquired recursively now (for both shared and exclusive paths).
>
> Yes, that was four months after I added rw_wowned(9) to work around the lack
> of recursion support. :-)  However, it looks like the man page was never
> updated?  It contains the following rather explicit language:
>
>       Another important property is that shared holders of rwlock can recurse,
>       but exclusive locks are not allowed to recurse.

Yes, I'm going to fix the manpage ASAP.
Thanks, for the report.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



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