summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-10-03 04:29:40 +0000
committerHal Finkel <hfinkel@anl.gov>2014-10-03 04:29:40 +0000
commit6970ac8b0a125136d1151740993af4c36b678def (patch)
treee97890ca8d4fa1d7d741c1339175c28c855f0413 /llvm/lib/Bitcode
parent5bacb0aef01c737c0799602fe8306d91e1b828fd (diff)
downloadbcm5719-llvm-6970ac8b0a125136d1151740993af4c36b678def.tar.gz
bcm5719-llvm-6970ac8b0a125136d1151740993af4c36b678def.zip
Add an implementation of C11's stdatomic.h
Adds a Clang-specific implementation of C11's stdatomic.h header. On systems, such as FreeBSD, where a stdatomic.h header is already provided, we defer to that header instead (using our __has_include_next technology). Otherwise, we provide an implementation in terms of our __c11_atomic_* intrinsics (that were created for this purpose). C11 7.1.4p1 requires function declarations for atomic_thread_fence, atomic_signal_fence, atomic_flag_test_and_set, atomic_flag_test_and_set_explicit, and atomic_flag_clear, and requires that they have external linkage. Accordingly, we provide these declarations, but if a user elides the shadowing macros and uses them, then they must have a libc (or similar) that actually provides definitions. atomic_flag is implemented using _Bool as the underlying type. This is consistent with the implementation provided by FreeBSD and also GCC 4.9 (at least when __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1). Patch by Richard Smith (rebased and slightly edited by me -- Richard said I should drive at this point). llvm-svn: 218957
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud