ovs-atomic-pthreads: Fix "has incomplete type" error.
authorAlex Wang <alexw@nicira.com>
Wed, 31 Jul 2013 23:09:11 +0000 (16:09 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 31 Jul 2013 23:07:46 +0000 (16:07 -0700)
commit13d94ee9c8c5e031a6fb46903802c56784c4d410
tree4cf2043e5d92504fad5d8c1f62dda910139b434b
parent431495b10f1c3aa577b8306ad996c41ff0581309
ovs-atomic-pthreads: Fix "has incomplete type" error.

Commit 97be153858b4cd175cbe7862b8e1624bf22ab98a (clang: Add
annotations for thread safety check.) defined 'struct ovs_mutex'
variable in 'atomic_flag' in 'ovs-atomic-pthreads.h'. This
casued "mutex: has incomplete type" error in compilation when
'ovs-atomic-pthreads.h' is included.

This commit goes back to use 'pthread_mutex_t' for that variable
and adds test for the 'atomic_flag' related functions.

Reported-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ovs-atomic-pthreads.c
lib/ovs-atomic-pthreads.h
lib/ovs-thread.c
lib/ovs-thread.h
tests/test-atomic.c