lib/ovs-thread: Use atomic_count.
authorJarno Rajahalme <jrajahalme@nicira.com>
Fri, 29 Aug 2014 23:15:44 +0000 (16:15 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Fri, 29 Aug 2014 23:15:44 +0000 (16:15 -0700)
commit6f0088655a776a8aa763e4889a94470ea61a59c9
tree85a41373bee19333c36554ddf41b7279940f578d
parentab355e676375f6d7b6715f3fc4ac6b750b5df1bb
lib/ovs-thread: Use atomic_count.

barrier->count is used as a simple counter and is not expected the
synchronize the state of any other variable, so we can use atomic_count,
which uses relaxed atomics.

Ditto for the 'next_id' within ovsthread_wrapper().

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/ovs-thread.c
lib/ovs-thread.h