[ovs-git] [openvswitch/ovs] 35736c: ovs-atomic-c++.h: Fix for 64 bit atomics.

Gurucharan Shetty noreply at github.com
Wed Jun 26 20:19:12 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 35736cff1901eab5b33892ff053f02d5d87cb8c1
      https://github.com/openvswitch/ovs/commit/35736cff1901eab5b33892ff053f02d5d87cb8c1
  Author: Gurucharan Shetty <guru at ovn.org>
  Date:   2019-06-26 (Wed, 26 Jun 2019)

  Changed paths:
    M lib/ovs-atomic-c++.h

  Log Message:
  -----------
  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 at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list