~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to lib/ovs-atomic-locked.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
     atomic_unlock__(SRC),                      \
21
21
     (void) 0)
22
22
 
 
23
/* XXX: Evaluates EXP multiple times. */
 
24
#define atomic_compare_exchange_locked(DST, EXP, SRC)   \
 
25
    (atomic_lock__(DST),                                \
 
26
     (*(DST) == *(EXP)                                  \
 
27
      ? (*(DST) = (SRC),                                \
 
28
         atomic_unlock__(DST),                          \
 
29
         true)                                          \
 
30
      : (*(EXP) = *(DST),                               \
 
31
         atomic_unlock__(DST),                          \
 
32
         false)))
 
33
 
23
34
#define atomic_op_locked_add +=
24
35
#define atomic_op_locked_sub -=
25
36
#define atomic_op_locked_or  |=