History log of /freebsd-9.3-release/include/stdatomic.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 264495 15-Apr-2014 tijl

MFC r263998:

Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4
-fms-extensions.


# 254783 24-Aug-2013 emaste

MFC r254465: Correct implementation of atomic_flag_test_and_set

(This is a direct commit to stable/9 as atomic_flag_test_and_set_explicit
is an inline function on HEAD and in a different file.)


# 254606 21-Aug-2013 tijl

MFC r241077:

- Simplify the implementation of atomic_compare_exchange_strong_explicit.
- Evaluate the memory order argument in atomic_fetch_*_explicit macros.
- Implement atomic_store_explicit using atomic_exchange_explicit instead
of a plain assignment.

MFC r241190:

Define clang feature test macro __has_extension. It's used in stdatomic.h.

MFC r254497:

Change the return type of the fallback implementation of the
atomic_compare_exchange_* macros in stdatomic.h to _Bool.


# 254513 19-Aug-2013 emaste

MFC r251192: Fix misspelling of structure field name.


# 254478 18-Aug-2013 emaste

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.


# 254477 18-Aug-2013 emaste

MFC r239960:

Properly enable Clang-style atomics when available.

In addition to testing against cxx_atomic, we must check c_atomic. The
former is only set when building C++ code. Also use __has_extension
instead of __has_feature. This allows us to use the atomics outside of
C11.

PR: threads/170073


# 236326 30-May-2012 theraven

MFC r228862, 228880, 228882, 228906, 228977, 229332, 229575, 229591, 229704,
229716, 230062, 230225, 230267, 234958

This brings stdatomic.h into -STABLE and includes improvements to tgmath.h that
significantly decrease compile times on a C11 compiler (such as the clang in
the base system).


# 228862 24-Dec-2011 theraven

Initial implementation of stdatomic.h. Works (at least in the parts that were
tested) with clang and gcc, and more efficiently with clang+a big out-of-tree
diff that I need to commit soon (once it's been tidied and reviewed a bit).

Large portions by: ed
Reviewed by: ed
Approved by: dim (mentor)