[ovs-git] [openvswitch/ovs] 5c6275: ovs-atomic: Prefer Clang intrinsics over <stdatomi...

GitHub noreply at github.com
Thu Jul 2 20:28:23 UTC 2015


  Branch: refs/heads/branch-2.3
  Home:   https://github.com/openvswitch/ovs
  Commit: 5c62757831a96c96ab48c5d158babad8f2147e30
      https://github.com/openvswitch/ovs/commit/5c62757831a96c96ab48c5d158babad8f2147e30
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-07-02 (Thu, 02 Jul 2015)

  Changed paths:
    M lib/ovs-atomic.h

  Log Message:
  -----------
  ovs-atomic: Prefer Clang intrinsics over <stdatomic.h>.

On my Debian "jessie" system, <stdatomic.h> provided by GCC 4.9 is busted
when Clang 3.5 tries to use it.  Even a trivial program like this:

    #include <stdatomic.h>

    void
    foo(void)
    {
   _Atomic(int) x;
   atomic_fetch_add(&x, 1);
}

yields:

     atomic.c:7:5: error: address argument to atomic operation must be a
  pointer to integer or pointer ('_Atomic(int) *' invalid)

The Clang-specific version of ovs-atomic.h stills works, though, so this
commit works around the problem.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 61b63eb8f241dd518532a34f685d7f19d4dcc5b5
      https://github.com/openvswitch/ovs/commit/61b63eb8f241dd518532a34f685d7f19d4dcc5b5
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-07-02 (Thu, 02 Jul 2015)

  Changed paths:
    M ofproto/ofproto.c

  Log Message:
  -----------
  ofproto: Hold ofproto_mutex when enabling or disabling eviction.

ofproto_enable_eviction() and ofproto_disable_eviction() require
ofproto_mutex (and they were even annotated that way, though not on their
prototypes but only at definition), but it wasn't being held.  This fixes
the problem.

Found by inspection.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/6b05f2f32576...61b63eb8f241


More information about the git mailing list