summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/regex2.h
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2012-09-26 19:49:22 +0000
committertijl <tijl@FreeBSD.org>2012-09-26 19:49:22 +0000
commit0d4a7769ee242da1cfca4c55dffedafd8a656c27 (patch)
tree873092856974775594664ff0b87e42bd187adc77 /lib/libc/regex/regex2.h
parent95d0e5a41c0eb872db91f775722408ca5411b19d (diff)
downloadFreeBSD-src-0d4a7769ee242da1cfca4c55dffedafd8a656c27.zip
FreeBSD-src-0d4a7769ee242da1cfca4c55dffedafd8a656c27.tar.gz
- 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. Reviewed by: theraven
Diffstat (limited to 'lib/libc/regex/regex2.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud