This is a discussion on Re: rwlocks, correctness over speed. - FreeBSD ; 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 ...
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
> 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.
Robert N M Watson
University of Cambridge
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"