Commit a436af3
committed
Avoid AO_stack_t to cross CPU cache line boundary
(a cherry-pick of commit ed712f7 from 'release-7_6')
Issue #45 (libatomic_ops).
Enforce proper alignment of AO_stack_t.AO_ptr to avoid the structure
value to cross the CPU cache line boundary. A workaround for
almost-lock-free push/pop test failures on aarch64, at least.
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE
&& !AO_STACK_ATTR_ALLIGNED] (AO_STACK_ATTR_ALLIGNED): Define.
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_t.AO_ptr): Add AO_STACK_ATTR_ALLIGNED attribute.1 parent 410ca73 commit a436af3
1 file changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
92 | 122 | | |
93 | 123 | | |
94 | 124 | | |
| |||
114 | 144 | | |
115 | 145 | | |
116 | 146 | | |
117 | | - | |
| 147 | + | |
118 | 148 | | |
119 | 149 | | |
120 | 150 | | |
| |||
0 commit comments