]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r240970:
authoremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 18 Aug 2013 08:24:58 +0000 (08:24 +0000)
committeremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 18 Aug 2013 08:24:58 +0000 (08:24 +0000)
commit1df2ba5fc5f19e546e28536ad1620c773d51dd88
tree348ee4ea07930c064ad9fdcc35baf0880c3ac8f3
parent56379335b7fa12a5d81961119f28b324d6470876
MFC r240970:

  - Make C11 atomic macros usable in expressions:
    - Replace do-while statements with void expressions.
    - Wrap __asm statements in statement expressions.
  - Make the macros function-like:
    - Evaluate all arguments exactly once.
    - Make sure there's a sequence point between evaluation of the
      arguments and the function body. Arguments should be evaluated
      before any memory barriers.
  - Fix use of __atomic_is_lock_free built-in. It requires the address
    of an atomic variable as second argument. Use this built-in on clang
    as well because clang's __c11_atomic_is_lock_free only takes the size
    of the variable into account.
  - In atomic_exchange_explicit put the barrier before instead of after
    the __sync_lock_test_and_set call.

git-svn-id: svn://svn.freebsd.org/base/stable/9@254478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
include/stdatomic.h