[ovs-dev] [rwlock 5/5] ovs-thread: Use fair (but nonrecursive) rwlocks on glibc.
blp at nicira.com
Fri Feb 21 18:54:21 UTC 2014
On Wed, Feb 19, 2014 at 03:10:45PM -0800, Joe Stringer wrote:
> On 16 January 2014 10:07, Ben Pfaff <blp at nicira.com> wrote:
> > + * An ovs_rwlock does not support recursive readers, because POSIX allows
> > + * taking the reader lock recursively to deadlock when a thread is
> > waiting on
> > + * the write-lock. (NetBSD does deadlock.) glibc does not deadlock in
> > this
> > + * situation by default, but ovs_rwlock_init() initializes rwlocks to do
> > so
> > + * anyway for two reasons:
> The last sentence seems a bit odd. Perhaps something closer to "glibc does
> not deadlock in this situation by default, but ovs_rwlock_init()
> initializes rwlocks as non-recursive anyway for two reasons:"?
> Acked-by: Joe Stringer <joestringer at nicira.com>
You're right, the wording is odd. I fixed it up. I'll apply this
after patch 3/5 is re-reviewed.
More information about the dev