[ovs-dev] [PATCH] ovs-thread: Fix OVS_ADAPTIVE_MUTEX_INITIALIZER.

Ben Pfaff blp at nicira.com
Thu May 1 15:47:05 UTC 2014


Thanks, applied.

On Thu, May 01, 2014 at 08:44:10AM -0700, Jarno Rajahalme wrote:
> Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
> 
> > On May 1, 2014, at 8:26 AM, Ben Pfaff <blp at nicira.com> wrote:
> > 
> > Commit 05bf6d3c62e1d (ovs-thread: Add checking for mutex and rwlock
> > initialization.) updated mutex and rwlock initializers to set the "where"
> > member to a nonnull value, but missed this one.  This commit fixes the
> > problem.
> > 
> > This does not cause real problems in practice because
> > OVS_ADAPTIVE_MUTEX_INITIALIZER has no existing users.
> > 
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > lib/ovs-thread.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h
> > index 180b66f..68db71f 100644
> > --- a/lib/ovs-thread.h
> > +++ b/lib/ovs-thread.h
> > @@ -40,7 +40,7 @@ struct OVS_LOCKABLE ovs_mutex {
> > 
> > #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
> > #define OVS_ADAPTIVE_MUTEX_INITIALIZER                  \
> > -    { PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, NULL }
> > +    { PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP, "<unlocked>" }
> > #else
> > #define OVS_ADAPTIVE_MUTEX_INITIALIZER OVS_MUTEX_INITIALIZER
> > #endif
> > -- 
> > 1.9.1
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list