From: Ben Pfaff Date: Wed, 31 Jul 2013 21:15:05 +0000 (-0700) Subject: netdev-vport: Use ovs_mutex rather than a raw pthread_mutex_t. X-Git-Tag: sliver-openvswitch-2.0.90-1~33^2~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9366380ae854726888c228830301cf9a54fbee4c;p=sliver-openvswitch.git netdev-vport: Use ovs_mutex rather than a raw pthread_mutex_t. I'd forgotten even to use the xpthread variants here. Signed-off-by: Ben Pfaff Acked-by: Andy Zhou --- diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 4214b383d..14b33475b 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -413,17 +413,17 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args) } if (tnl_cfg.ipsec) { - static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + static struct ovs_mutex mutex = OVS_MUTEX_INITIALIZER; static pid_t pid = 0; - pthread_mutex_lock(&mutex); + ovs_mutex_lock(&mutex); if (pid <= 0) { char *file_name = xasprintf("%s/%s", ovs_rundir(), "ovs-monitor-ipsec.pid"); pid = read_pidfile(file_name); free(file_name); } - pthread_mutex_unlock(&mutex); + ovs_mutex_unlock(&mutex); if (pid < 0) { VLOG_ERR("%s: IPsec requires the ovs-monitor-ipsec daemon",