Reported-by: Andy Zhou <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
---
include/sparse/pthread.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/include/sparse/pthread.h b/include/sparse/pthread.h
index 723c351..1a025bf 100644
--- a/include/sparse/pthread.h
+++ b/include/sparse/pthread.h
@@ -33,12 +33,18 @@ int pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
OVS_RELEASES(rwlock);
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *mutex)
OVS_MUST_HOLD(mutex);
-/* Sparse complains about the proper PTHREAD_MUTEX_INITIALIZER definition.
+/* Sparse complains about the proper PTHREAD_*_INITIALIZER definitions.
* Luckily, it's not a real compiler so we can overwrite it with something
* simple. */
#undef PTHREAD_MUTEX_INITIALIZER
#define PTHREAD_MUTEX_INITIALIZER {}
+#undef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER
+#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER {}
+
+#undef PTHREAD_RWLOCK_INITIALIZER
+#define PTHREAD_RWLOCK_INITIALIZER {}
+
#define pthread_mutex_trylock(MUTEX) \
({ \
int retval = pthread_mutex_trylock(mutex); \
--
1.7.2.5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev