]> git.proxmox.com Git - mirror_ovs.git/commit
ovs-atomic-c++.h: Fix for 64 bit atomics.
authorGurucharan Shetty <guru@ovn.org>
Wed, 12 Jun 2019 10:57:29 +0000 (03:57 -0700)
committerGurucharan Shetty <guru@ovn.org>
Wed, 26 Jun 2019 09:02:17 +0000 (02:02 -0700)
commit35736cff1901eab5b33892ff053f02d5d87cb8c1
tree3ac7a9d67874362a1a5c93ea82def389f2df0a2a
parent7235cd206e9f768cbbc46ca0a41bdc3e9cf60cfa
ovs-atomic-c++.h: Fix for 64 bit atomics.

Commit e981a45a6cae4 (ovs-atomic: Add 64 bit apis.)
added a few 64 bit apis (e.g: atomic_count_inc64).  For C++,
this invokes std::atomic_fetch_*_explicit() functions in
lib/ovs-atomic-c++.h.

The function overloading for 64 bit function fails without
specifiying something like: std::atomic_fetch_*_explicit<std::uint64_t>().
But it looks tricky to do this with macros.

This patch tries to fix the compilation failures by calling atomic
functions on the variables itself.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/ovs-atomic-c++.h