ovs-atomic: New functions atomic_flag_init(), atomic_flag_destroy().
authorBen Pfaff <blp@nicira.com>
Thu, 9 Jan 2014 01:13:28 +0000 (17:13 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 9 Jan 2014 01:13:28 +0000 (17:13 -0800)
commit4597d2a57226eaec787d6501e88ab32f3b6209e1
tree96a785625df35b656aadec214300147fe3b0a655
parent5c8d2fcad02cd65c21522ce348f32d5350df320b
ovs-atomic: New functions atomic_flag_init(), atomic_flag_destroy().

Standard C11 doesn't need these functions because it is able to require
implementations not to need them.  But we can't construct a portable
implementation that does not need them in every case, so this commit adds
them.

These functions are only needed for atomic_flag objects that are
dynamically allocated (because statically allocated objects can use
ATOMIC_FLAG_INIT).  So far there aren't any of those, but an upcoming
commit will introduce one.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/ovs-atomic-c11.h
lib/ovs-atomic-flag-gcc4.7+.h
lib/ovs-atomic-gcc4+.h
lib/ovs-atomic-pthreads.c
lib/ovs-atomic-pthreads.h
lib/ovs-atomic.h