summaryrefslogtreecommitdiff
path: root/include/sparse
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-08-12 15:49:25 -0700
committerBen Pfaff <blp@nicira.com>2013-08-13 09:42:28 -0700
commit47b52c71232c01837e5c5e374af8033fbf711f0f (patch)
tree70671555baf4350f7423853d2b9ad76c544479c0 /include/sparse
parentbf19526b900f80b17980fca578d278a18522c8b4 (diff)
downloadopenvswitch-47b52c71232c01837e5c5e374af8033fbf711f0f.tar.gz
sparse: Remove support for thread-safety annotations.
The Clang support for thread-safety annotations is much more effective than "sparse" support. I found that I was unable to make the annotations warning-free under sparse. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'include/sparse')
-rw-r--r--include/sparse/pthread.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/include/sparse/pthread.h b/include/sparse/pthread.h
index aa4652efc..40c5ca3a5 100644
--- a/include/sparse/pthread.h
+++ b/include/sparse/pthread.h
@@ -21,18 +21,6 @@
/* Get actual <pthread.h> definitions for us to annotate and build on. */
#include_next <pthread.h>
-#include "compiler.h"
-
-int pthread_mutex_lock(pthread_mutex_t *mutex) OVS_ACQUIRES(mutex);
-int pthread_mutex_unlock(pthread_mutex_t *mutex) OVS_RELEASES(mutex);
-
-int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) OVS_ACQ_RDLOCK(rwlock);
-int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) OVS_ACQ_WRLOCK(rwlock);
-int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) OVS_RELEASES(rwlock);
-
-int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *mutex)
- OVS_REQUIRES(mutex);
-
/* Sparse complains about the proper PTHREAD_*_INITIALIZER definitions.
* Luckily, it's not a real compiler so we can overwrite it with something
* simple. */
@@ -47,29 +35,3 @@ int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *mutex)
#undef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP {}
-
-#define pthread_mutex_trylock(MUTEX) \
- ({ \
- int retval = pthread_mutex_trylock(mutex); \
- if (!retval) { \
- OVS_MACRO_LOCK(MUTEX); \
- } \
- retval; \
- })
-
-#define pthread_rwlock_tryrdlock(RWLOCK) \
- ({ \
- int retval = pthread_rwlock_tryrdlock(rwlock); \
- if (!retval) { \
- OVS_MACRO_LOCK(RWLOCK); \
- } \
- retval; \
- })
-#define pthread_rwlock_trywrlock(RWLOCK) \
- ({ \
- int retval = pthread_rwlock_trywrlock(rwlock); \
- if (!retval) { \
- OVS_MACRO_LOCK(RWLOCK); \
- } \
- retval; \
- })