diff mbox series

[ovs-dev,3/4] ovs-thread: Drop xpthread_meutex_{un}lock finctions.

Message ID 20181210170523.2279-4-i.maximets@samsung.com
State Accepted
Headers show
Series Various build/test fixes. | expand

Commit Message

Ilya Maximets Dec. 10, 2018, 5:05 p.m. UTC
There are no users of these functions.
This change fixes clang build on FreeBSD:

  lib/ovs-thread.c:158:1: error: \
      mutex 'mutex' is still held at the end of function \
      [-Werror,-Wthread-safety-analysis]
  XPTHREAD_FUNC1(pthread_mutex_lock, pthread_mutex_t *);
  ^
  lib/ovs-thread.c:138:5: note: expanded from macro 'XPTHREAD_FUNC1'
      }
      ^

Fixes: 4dff0893c376 ("ovs-atomic-pthreads: Use global shared locks for atomic_flag also.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/ovs-thread.c | 2 --
 lib/ovs-thread.h | 5 -----
 2 files changed, 7 deletions(-)

Comments

Ben Pfaff Dec. 10, 2018, 5:52 p.m. UTC | #1
On Mon, Dec 10, 2018 at 08:05:22PM +0300, Ilya Maximets wrote:
> There are no users of these functions.
> This change fixes clang build on FreeBSD:
> 
>   lib/ovs-thread.c:158:1: error: \
>       mutex 'mutex' is still held at the end of function \
>       [-Werror,-Wthread-safety-analysis]
>   XPTHREAD_FUNC1(pthread_mutex_lock, pthread_mutex_t *);
>   ^
>   lib/ovs-thread.c:138:5: note: expanded from macro 'XPTHREAD_FUNC1'
>       }
>       ^
> 
> Fixes: 4dff0893c376 ("ovs-atomic-pthreads: Use global shared locks for atomic_flag also.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>

Applied to master, thanks!
diff mbox series

Patch

diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
index c72bc543b..b5f7424b7 100644
--- a/lib/ovs-thread.c
+++ b/lib/ovs-thread.c
@@ -155,8 +155,6 @@  UNLOCK_FUNCTION(rwlock, destroy, NULL);
         }                                               \
     }
 
-XPTHREAD_FUNC1(pthread_mutex_lock, pthread_mutex_t *);
-XPTHREAD_FUNC1(pthread_mutex_unlock, pthread_mutex_t *);
 XPTHREAD_FUNC1(pthread_mutexattr_init, pthread_mutexattr_t *);
 XPTHREAD_FUNC1(pthread_mutexattr_destroy, pthread_mutexattr_t *);
 XPTHREAD_FUNC2(pthread_mutexattr_settype, pthread_mutexattr_t *, int);
diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h
index 0f9663324..1050fc29a 100644
--- a/lib/ovs-thread.h
+++ b/lib/ovs-thread.h
@@ -33,11 +33,6 @@  struct ovs_barrier {
     struct seq *seq;
 };
 
-/* Wrappers for pthread_mutex_*() that abort the process on any error.
- * This is still needed when ovs-atomic-pthreads.h is used. */
-void xpthread_mutex_lock(pthread_mutex_t *mutex);
-void xpthread_mutex_unlock(pthread_mutex_t *mutex);
-
 /* Wrappers for pthread_mutexattr_*() that abort the process on any error. */
 void xpthread_mutexattr_init(pthread_mutexattr_t *);
 void xpthread_mutexattr_destroy(pthread_mutexattr_t *);