summaryrefslogtreecommitdiffstats
path: root/.clang-format
blob: 977ed2dbf00382efdf36a52330147e56ae465096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BinPackParameters: true
BreakBeforeBraces: GNU
ColumnLimit:     79
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpacesBeforeTrailingComments: 1
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
Cpp11BracedListStyle: true
Standard:        Cpp11
SortIncludes: false
IndentWidth:     2
TabWidth:        4
UseTab:          Never
IndentFunctionDeclarationAfterType: false
ContinuationIndentWidth: 4
...
se. */ #ifndef included_clib_atomics_h #define included_clib_atomics_h /* Legacy __sync builtins */ /* Full Barrier */ #define clib_atomic_fetch_add(a, b) __sync_fetch_and_add(a, b) #define clib_atomic_fetch_sub(a, b) __sync_fetch_and_sub(a, b) #define clib_atomic_fetch_and(a, b) __sync_fetch_and_and(a, b) #define clib_atomic_fetch_xor(a, b) __sync_fetch_and_xor(a, b) #define clib_atomic_fetch_or(a, b) __sync_fetch_and_or(a, b) #define clib_atomic_fetch_nand(a, b) __sync_fetch_nand(a, b) #define clib_atomic_add_fetch(a, b) __sync_add_and_fetch(a, b) #define clib_atomic_sub_fetch(a, b) __sync_sub_and_fetch(a, b) #define clib_atomic_and_fetch(a, b) __sync_and_and_fetch(a, b) #define clib_atomic_xor_fetch(a, b) __sync_xor_and_fetch(a, b) #define clib_atomic_or_fetch(a, b) __sync_or_and_fetch(a, b) #define clib_atomic_nand_fetch(a, b) __sync_nand_and_fetch(a, b) #define clib_atomic_cmp_and_swap(addr,old,new) __sync_val_compare_and_swap(addr, old, new) #define clib_atomic_bool_cmp_and_swap(addr,old,new) __sync_bool_compare_and_swap(addr, old, new) #define clib_atomic_cmp_and_swap_acq_relax_n(addr,exp,new,weak) __atomic_compare_exchange_n ((addr), (exp), (new), (weak), __ATOMIC_ACQUIRE, __ATOMIC_RELAXED) #define clib_atomic_test_and_set(a) __atomic_exchange_n(a, 1, __ATOMIC_ACQUIRE) #define clib_atomic_release(a) __atomic_store_n(a, 0, __ATOMIC_RELEASE) #define clib_atomic_fence_rel() __atomic_thread_fence(__ATOMIC_RELEASE); #define clib_atomic_load_relax_n(a) __atomic_load_n((a), __ATOMIC_RELAXED) #define clib_atomic_load_acq_n(a) __atomic_load_n((a), __ATOMIC_ACQUIRE) #define clib_atomic_store_rel_n(a, b) __atomic_store_n ((a), (b), __ATOMIC_RELEASE) #define clib_atomic_swap_acq_n(a, b) __atomic_exchange_n ((a), (b), __ATOMIC_ACQUIRE) #define clib_atomic_swap_rel_n(a, b) __atomic_exchange_n ((a), (b), __ATOMIC_RELEASE) #define clib_atomic_fetch_add_rel(a, b) __atomic_fetch_add((a), (b), __ATOMIC_RELEASE) #define clib_atomic_fetch_sub_rel(a, b) __atomic_fetch_sub((a), (b), __ATOMIC_RELEASE) #define clib_atomic_fetch_add_relax(a, b) __atomic_fetch_add((a), (b), __ATOMIC_RELAXED) #define clib_atomic_fetch_sub_relax(a, b) __atomic_fetch_sub((a), (b), __ATOMIC_RELAXED) #endif /* included_clib_atomics_h */