toolchain/gcc: backport FORTIFY patch to 5.5.0
[openwrt/staging/mkresin.git] / toolchain / gcc / patches / 5.5.0 / 050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch
1 From 55f12fce4ccf77513644a247f9c401a5b1fa2402 Mon Sep 17 00:00:00 2001
2 From: torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Thu, 20 Aug 2015 17:55:24 +0000
4 Subject: [PATCH] libitm: Don't redefine __always_inline in local_atomic.
5
6 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227040 138bc75d-0d04-0410-961f-82ee72b054a4
7 ---
8 libitm/ChangeLog | 6 +
9 libitm/local_atomic | 299 ++++++++++++++++++++++----------------------
10 2 files changed, 155 insertions(+), 150 deletions(-)
11
12 diff --git a/libitm/ChangeLog b/libitm/ChangeLog
13 index 569d5bbbf14..6285c85fd44 100644
14 --- a/libitm/ChangeLog
15 +++ b/libitm/ChangeLog
16 @@ -1,3 +1,9 @@
17 +2015-08-20 Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> (tiny change)
18 +
19 + PR libitm/61164
20 + * local_atomic (__always_inline): Rename to...
21 + (__libitm_always_inline): ... this.
22 +
23 2017-10-10 Release Manager
24
25 PR target/52482
26 diff --git a/libitm/local_atomic b/libitm/local_atomic
27 index 3119be40d09..e536275dc9f 100644
28 --- a/libitm/local_atomic
29 +++ b/libitm/local_atomic
30 @@ -41,8 +41,7 @@
31 #ifndef _GLIBCXX_ATOMIC
32 #define _GLIBCXX_ATOMIC 1
33
34 -#undef __always_inline
35 -#define __always_inline __attribute__((always_inline))
36 +#define __libitm_always_inline __attribute__((always_inline))
37
38 // #pragma GCC system_header
39
40 @@ -74,7 +73,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
41 memory_order_seq_cst
42 } memory_order;
43
44 - inline __always_inline memory_order
45 + inline __libitm_always_inline memory_order
46 __calculate_memory_order(memory_order __m) noexcept
47 {
48 const bool __cond1 = __m == memory_order_release;
49 @@ -84,13 +83,13 @@ namespace std // _GLIBCXX_VISIBILITY(default)
50 return __mo2;
51 }
52
53 - inline __always_inline void
54 + inline __libitm_always_inline void
55 atomic_thread_fence(memory_order __m) noexcept
56 {
57 __atomic_thread_fence (__m);
58 }
59
60 - inline __always_inline void
61 + inline __libitm_always_inline void
62 atomic_signal_fence(memory_order __m) noexcept
63 {
64 __atomic_thread_fence (__m);
65 @@ -280,19 +279,19 @@ namespace std // _GLIBCXX_VISIBILITY(default)
66 // Conversion to ATOMIC_FLAG_INIT.
67 atomic_flag(bool __i) noexcept : __atomic_flag_base({ __i }) { }
68
69 - __always_inline bool
70 + __libitm_always_inline bool
71 test_and_set(memory_order __m = memory_order_seq_cst) noexcept
72 {
73 return __atomic_test_and_set (&_M_i, __m);
74 }
75
76 - __always_inline bool
77 + __libitm_always_inline bool
78 test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept
79 {
80 return __atomic_test_and_set (&_M_i, __m);
81 }
82
83 - __always_inline void
84 + __libitm_always_inline void
85 clear(memory_order __m = memory_order_seq_cst) noexcept
86 {
87 // __glibcxx_assert(__m != memory_order_consume);
88 @@ -302,7 +301,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
89 __atomic_clear (&_M_i, __m);
90 }
91
92 - __always_inline void
93 + __libitm_always_inline void
94 clear(memory_order __m = memory_order_seq_cst) volatile noexcept
95 {
96 // __glibcxx_assert(__m != memory_order_consume);
97 @@ -455,7 +454,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
98 is_lock_free() const volatile noexcept
99 { return __atomic_is_lock_free (sizeof (_M_i), &_M_i); }
100
101 - __always_inline void
102 + __libitm_always_inline void
103 store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept
104 {
105 // __glibcxx_assert(__m != memory_order_acquire);
106 @@ -465,7 +464,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
107 __atomic_store_n(&_M_i, __i, __m);
108 }
109
110 - __always_inline void
111 + __libitm_always_inline void
112 store(__int_type __i,
113 memory_order __m = memory_order_seq_cst) volatile noexcept
114 {
115 @@ -476,7 +475,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
116 __atomic_store_n(&_M_i, __i, __m);
117 }
118
119 - __always_inline __int_type
120 + __libitm_always_inline __int_type
121 load(memory_order __m = memory_order_seq_cst) const noexcept
122 {
123 // __glibcxx_assert(__m != memory_order_release);
124 @@ -485,7 +484,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
125 return __atomic_load_n(&_M_i, __m);
126 }
127
128 - __always_inline __int_type
129 + __libitm_always_inline __int_type
130 load(memory_order __m = memory_order_seq_cst) const volatile noexcept
131 {
132 // __glibcxx_assert(__m != memory_order_release);
133 @@ -494,21 +493,21 @@ namespace std // _GLIBCXX_VISIBILITY(default)
134 return __atomic_load_n(&_M_i, __m);
135 }
136
137 - __always_inline __int_type
138 + __libitm_always_inline __int_type
139 exchange(__int_type __i,
140 memory_order __m = memory_order_seq_cst) noexcept
141 {
142 return __atomic_exchange_n(&_M_i, __i, __m);
143 }
144
145 - __always_inline __int_type
146 + __libitm_always_inline __int_type
147 exchange(__int_type __i,
148 memory_order __m = memory_order_seq_cst) volatile noexcept
149 {
150 return __atomic_exchange_n(&_M_i, __i, __m);
151 }
152
153 - __always_inline bool
154 + __libitm_always_inline bool
155 compare_exchange_weak(__int_type& __i1, __int_type __i2,
156 memory_order __m1, memory_order __m2) noexcept
157 {
158 @@ -519,7 +518,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
159 return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2);
160 }
161
162 - __always_inline bool
163 + __libitm_always_inline bool
164 compare_exchange_weak(__int_type& __i1, __int_type __i2,
165 memory_order __m1,
166 memory_order __m2) volatile noexcept
167 @@ -531,7 +530,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
168 return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2);
169 }
170
171 - __always_inline bool
172 + __libitm_always_inline bool
173 compare_exchange_weak(__int_type& __i1, __int_type __i2,
174 memory_order __m = memory_order_seq_cst) noexcept
175 {
176 @@ -539,7 +538,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
177 __calculate_memory_order(__m));
178 }
179
180 - __always_inline bool
181 + __libitm_always_inline bool
182 compare_exchange_weak(__int_type& __i1, __int_type __i2,
183 memory_order __m = memory_order_seq_cst) volatile noexcept
184 {
185 @@ -547,7 +546,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
186 __calculate_memory_order(__m));
187 }
188
189 - __always_inline bool
190 + __libitm_always_inline bool
191 compare_exchange_strong(__int_type& __i1, __int_type __i2,
192 memory_order __m1, memory_order __m2) noexcept
193 {
194 @@ -558,7 +557,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
195 return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
196 }
197
198 - __always_inline bool
199 + __libitm_always_inline bool
200 compare_exchange_strong(__int_type& __i1, __int_type __i2,
201 memory_order __m1,
202 memory_order __m2) volatile noexcept
203 @@ -570,7 +569,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
204 return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
205 }
206
207 - __always_inline bool
208 + __libitm_always_inline bool
209 compare_exchange_strong(__int_type& __i1, __int_type __i2,
210 memory_order __m = memory_order_seq_cst) noexcept
211 {
212 @@ -578,7 +577,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
213 __calculate_memory_order(__m));
214 }
215
216 - __always_inline bool
217 + __libitm_always_inline bool
218 compare_exchange_strong(__int_type& __i1, __int_type __i2,
219 memory_order __m = memory_order_seq_cst) volatile noexcept
220 {
221 @@ -586,52 +585,52 @@ namespace std // _GLIBCXX_VISIBILITY(default)
222 __calculate_memory_order(__m));
223 }
224
225 - __always_inline __int_type
226 + __libitm_always_inline __int_type
227 fetch_add(__int_type __i,
228 memory_order __m = memory_order_seq_cst) noexcept
229 { return __atomic_fetch_add(&_M_i, __i, __m); }
230
231 - __always_inline __int_type
232 + __libitm_always_inline __int_type
233 fetch_add(__int_type __i,
234 memory_order __m = memory_order_seq_cst) volatile noexcept
235 { return __atomic_fetch_add(&_M_i, __i, __m); }
236
237 - __always_inline __int_type
238 + __libitm_always_inline __int_type
239 fetch_sub(__int_type __i,
240 memory_order __m = memory_order_seq_cst) noexcept
241 { return __atomic_fetch_sub(&_M_i, __i, __m); }
242
243 - __always_inline __int_type
244 + __libitm_always_inline __int_type
245 fetch_sub(__int_type __i,
246 memory_order __m = memory_order_seq_cst) volatile noexcept
247 { return __atomic_fetch_sub(&_M_i, __i, __m); }
248
249 - __always_inline __int_type
250 + __libitm_always_inline __int_type
251 fetch_and(__int_type __i,
252 memory_order __m = memory_order_seq_cst) noexcept
253 { return __atomic_fetch_and(&_M_i, __i, __m); }
254
255 - __always_inline __int_type
256 + __libitm_always_inline __int_type
257 fetch_and(__int_type __i,
258 memory_order __m = memory_order_seq_cst) volatile noexcept
259 { return __atomic_fetch_and(&_M_i, __i, __m); }
260
261 - __always_inline __int_type
262 + __libitm_always_inline __int_type
263 fetch_or(__int_type __i,
264 memory_order __m = memory_order_seq_cst) noexcept
265 { return __atomic_fetch_or(&_M_i, __i, __m); }
266
267 - __always_inline __int_type
268 + __libitm_always_inline __int_type
269 fetch_or(__int_type __i,
270 memory_order __m = memory_order_seq_cst) volatile noexcept
271 { return __atomic_fetch_or(&_M_i, __i, __m); }
272
273 - __always_inline __int_type
274 + __libitm_always_inline __int_type
275 fetch_xor(__int_type __i,
276 memory_order __m = memory_order_seq_cst) noexcept
277 { return __atomic_fetch_xor(&_M_i, __i, __m); }
278
279 - __always_inline __int_type
280 + __libitm_always_inline __int_type
281 fetch_xor(__int_type __i,
282 memory_order __m = memory_order_seq_cst) volatile noexcept
283 { return __atomic_fetch_xor(&_M_i, __i, __m); }
284 @@ -733,7 +732,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
285 is_lock_free() const volatile noexcept
286 { return __atomic_is_lock_free (sizeof (_M_p), &_M_p); }
287
288 - __always_inline void
289 + __libitm_always_inline void
290 store(__pointer_type __p,
291 memory_order __m = memory_order_seq_cst) noexcept
292 {
293 @@ -744,7 +743,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
294 __atomic_store_n(&_M_p, __p, __m);
295 }
296
297 - __always_inline void
298 + __libitm_always_inline void
299 store(__pointer_type __p,
300 memory_order __m = memory_order_seq_cst) volatile noexcept
301 {
302 @@ -755,7 +754,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
303 __atomic_store_n(&_M_p, __p, __m);
304 }
305
306 - __always_inline __pointer_type
307 + __libitm_always_inline __pointer_type
308 load(memory_order __m = memory_order_seq_cst) const noexcept
309 {
310 // __glibcxx_assert(__m != memory_order_release);
311 @@ -764,7 +763,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
312 return __atomic_load_n(&_M_p, __m);
313 }
314
315 - __always_inline __pointer_type
316 + __libitm_always_inline __pointer_type
317 load(memory_order __m = memory_order_seq_cst) const volatile noexcept
318 {
319 // __glibcxx_assert(__m != memory_order_release);
320 @@ -773,21 +772,21 @@ namespace std // _GLIBCXX_VISIBILITY(default)
321 return __atomic_load_n(&_M_p, __m);
322 }
323
324 - __always_inline __pointer_type
325 + __libitm_always_inline __pointer_type
326 exchange(__pointer_type __p,
327 memory_order __m = memory_order_seq_cst) noexcept
328 {
329 return __atomic_exchange_n(&_M_p, __p, __m);
330 }
331
332 - __always_inline __pointer_type
333 + __libitm_always_inline __pointer_type
334 exchange(__pointer_type __p,
335 memory_order __m = memory_order_seq_cst) volatile noexcept
336 {
337 return __atomic_exchange_n(&_M_p, __p, __m);
338 }
339
340 - __always_inline bool
341 + __libitm_always_inline bool
342 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
343 memory_order __m1,
344 memory_order __m2) noexcept
345 @@ -799,7 +798,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
346 return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2);
347 }
348
349 - __always_inline bool
350 + __libitm_always_inline bool
351 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
352 memory_order __m1,
353 memory_order __m2) volatile noexcept
354 @@ -811,22 +810,22 @@ namespace std // _GLIBCXX_VISIBILITY(default)
355 return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2);
356 }
357
358 - __always_inline __pointer_type
359 + __libitm_always_inline __pointer_type
360 fetch_add(ptrdiff_t __d,
361 memory_order __m = memory_order_seq_cst) noexcept
362 { return __atomic_fetch_add(&_M_p, __d, __m); }
363
364 - __always_inline __pointer_type
365 + __libitm_always_inline __pointer_type
366 fetch_add(ptrdiff_t __d,
367 memory_order __m = memory_order_seq_cst) volatile noexcept
368 { return __atomic_fetch_add(&_M_p, __d, __m); }
369
370 - __always_inline __pointer_type
371 + __libitm_always_inline __pointer_type
372 fetch_sub(ptrdiff_t __d,
373 memory_order __m = memory_order_seq_cst) noexcept
374 { return __atomic_fetch_sub(&_M_p, __d, __m); }
375
376 - __always_inline __pointer_type
377 + __libitm_always_inline __pointer_type
378 fetch_sub(ptrdiff_t __d,
379 memory_order __m = memory_order_seq_cst) volatile noexcept
380 { return __atomic_fetch_sub(&_M_p, __d, __m); }
381 @@ -870,67 +869,67 @@ namespace std // _GLIBCXX_VISIBILITY(default)
382 bool
383 is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); }
384
385 - __always_inline void
386 + __libitm_always_inline void
387 store(bool __i, memory_order __m = memory_order_seq_cst) noexcept
388 { _M_base.store(__i, __m); }
389
390 - __always_inline void
391 + __libitm_always_inline void
392 store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept
393 { _M_base.store(__i, __m); }
394
395 - __always_inline bool
396 + __libitm_always_inline bool
397 load(memory_order __m = memory_order_seq_cst) const noexcept
398 { return _M_base.load(__m); }
399
400 - __always_inline bool
401 + __libitm_always_inline bool
402 load(memory_order __m = memory_order_seq_cst) const volatile noexcept
403 { return _M_base.load(__m); }
404
405 - __always_inline bool
406 + __libitm_always_inline bool
407 exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept
408 { return _M_base.exchange(__i, __m); }
409
410 - __always_inline bool
411 + __libitm_always_inline bool
412 exchange(bool __i,
413 memory_order __m = memory_order_seq_cst) volatile noexcept
414 { return _M_base.exchange(__i, __m); }
415
416 - __always_inline bool
417 + __libitm_always_inline bool
418 compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
419 memory_order __m2) noexcept
420 { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
421
422 - __always_inline bool
423 + __libitm_always_inline bool
424 compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
425 memory_order __m2) volatile noexcept
426 { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
427
428 - __always_inline bool
429 + __libitm_always_inline bool
430 compare_exchange_weak(bool& __i1, bool __i2,
431 memory_order __m = memory_order_seq_cst) noexcept
432 { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
433
434 - __always_inline bool
435 + __libitm_always_inline bool
436 compare_exchange_weak(bool& __i1, bool __i2,
437 memory_order __m = memory_order_seq_cst) volatile noexcept
438 { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
439
440 - __always_inline bool
441 + __libitm_always_inline bool
442 compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
443 memory_order __m2) noexcept
444 { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
445
446 - __always_inline bool
447 + __libitm_always_inline bool
448 compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
449 memory_order __m2) volatile noexcept
450 { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
451
452 - __always_inline bool
453 + __libitm_always_inline bool
454 compare_exchange_strong(bool& __i1, bool __i2,
455 memory_order __m = memory_order_seq_cst) noexcept
456 { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
457
458 - __always_inline bool
459 + __libitm_always_inline bool
460 compare_exchange_strong(bool& __i1, bool __i2,
461 memory_order __m = memory_order_seq_cst) volatile noexcept
462 { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
463 @@ -980,11 +979,11 @@ namespace std // _GLIBCXX_VISIBILITY(default)
464 store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept
465 { __atomic_store(&_M_i, &__i, _m); }
466
467 - __always_inline void
468 + __libitm_always_inline void
469 store(_Tp __i, memory_order _m = memory_order_seq_cst) volatile noexcept
470 { __atomic_store(&_M_i, &__i, _m); }
471
472 - __always_inline _Tp
473 + __libitm_always_inline _Tp
474 load(memory_order _m = memory_order_seq_cst) const noexcept
475 {
476 _Tp tmp;
477 @@ -992,7 +991,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
478 return tmp;
479 }
480
481 - __always_inline _Tp
482 + __libitm_always_inline _Tp
483 load(memory_order _m = memory_order_seq_cst) const volatile noexcept
484 {
485 _Tp tmp;
486 @@ -1000,7 +999,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
487 return tmp;
488 }
489
490 - __always_inline _Tp
491 + __libitm_always_inline _Tp
492 exchange(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept
493 {
494 _Tp tmp;
495 @@ -1008,7 +1007,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
496 return tmp;
497 }
498
499 - __always_inline _Tp
500 + __libitm_always_inline _Tp
501 exchange(_Tp __i,
502 memory_order _m = memory_order_seq_cst) volatile noexcept
503 {
504 @@ -1017,50 +1016,50 @@ namespace std // _GLIBCXX_VISIBILITY(default)
505 return tmp;
506 }
507
508 - __always_inline bool
509 + __libitm_always_inline bool
510 compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
511 memory_order __f) noexcept
512 {
513 return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f);
514 }
515
516 - __always_inline bool
517 + __libitm_always_inline bool
518 compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s,
519 memory_order __f) volatile noexcept
520 {
521 return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f);
522 }
523
524 - __always_inline bool
525 + __libitm_always_inline bool
526 compare_exchange_weak(_Tp& __e, _Tp __i,
527 memory_order __m = memory_order_seq_cst) noexcept
528 { return compare_exchange_weak(__e, __i, __m, __m); }
529
530 - __always_inline bool
531 + __libitm_always_inline bool
532 compare_exchange_weak(_Tp& __e, _Tp __i,
533 memory_order __m = memory_order_seq_cst) volatile noexcept
534 { return compare_exchange_weak(__e, __i, __m, __m); }
535
536 - __always_inline bool
537 + __libitm_always_inline bool
538 compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
539 memory_order __f) noexcept
540 {
541 return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f);
542 }
543
544 - __always_inline bool
545 + __libitm_always_inline bool
546 compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s,
547 memory_order __f) volatile noexcept
548 {
549 return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f);
550 }
551
552 - __always_inline bool
553 + __libitm_always_inline bool
554 compare_exchange_strong(_Tp& __e, _Tp __i,
555 memory_order __m = memory_order_seq_cst) noexcept
556 { return compare_exchange_strong(__e, __i, __m, __m); }
557
558 - __always_inline bool
559 + __libitm_always_inline bool
560 compare_exchange_strong(_Tp& __e, _Tp __i,
561 memory_order __m = memory_order_seq_cst) volatile noexcept
562 { return compare_exchange_strong(__e, __i, __m, __m); }
563 @@ -1153,46 +1152,46 @@ namespace std // _GLIBCXX_VISIBILITY(default)
564 is_lock_free() const volatile noexcept
565 { return _M_b.is_lock_free(); }
566
567 - __always_inline void
568 + __libitm_always_inline void
569 store(__pointer_type __p,
570 memory_order __m = memory_order_seq_cst) noexcept
571 { return _M_b.store(__p, __m); }
572
573 - __always_inline void
574 + __libitm_always_inline void
575 store(__pointer_type __p,
576 memory_order __m = memory_order_seq_cst) volatile noexcept
577 { return _M_b.store(__p, __m); }
578
579 - __always_inline __pointer_type
580 + __libitm_always_inline __pointer_type
581 load(memory_order __m = memory_order_seq_cst) const noexcept
582 { return _M_b.load(__m); }
583
584 - __always_inline __pointer_type
585 + __libitm_always_inline __pointer_type
586 load(memory_order __m = memory_order_seq_cst) const volatile noexcept
587 { return _M_b.load(__m); }
588
589 - __always_inline __pointer_type
590 + __libitm_always_inline __pointer_type
591 exchange(__pointer_type __p,
592 memory_order __m = memory_order_seq_cst) noexcept
593 { return _M_b.exchange(__p, __m); }
594
595 - __always_inline __pointer_type
596 + __libitm_always_inline __pointer_type
597 exchange(__pointer_type __p,
598 memory_order __m = memory_order_seq_cst) volatile noexcept
599 { return _M_b.exchange(__p, __m); }
600
601 - __always_inline bool
602 + __libitm_always_inline bool
603 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
604 memory_order __m1, memory_order __m2) noexcept
605 { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
606
607 - __always_inline bool
608 + __libitm_always_inline bool
609 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
610 memory_order __m1,
611 memory_order __m2) volatile noexcept
612 { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
613
614 - __always_inline bool
615 + __libitm_always_inline bool
616 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
617 memory_order __m = memory_order_seq_cst) noexcept
618 {
619 @@ -1200,7 +1199,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
620 __calculate_memory_order(__m));
621 }
622
623 - __always_inline bool
624 + __libitm_always_inline bool
625 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
626 memory_order __m = memory_order_seq_cst) volatile noexcept
627 {
628 @@ -1208,18 +1207,18 @@ namespace std // _GLIBCXX_VISIBILITY(default)
629 __calculate_memory_order(__m));
630 }
631
632 - __always_inline bool
633 + __libitm_always_inline bool
634 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
635 memory_order __m1, memory_order __m2) noexcept
636 { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
637
638 - __always_inline bool
639 + __libitm_always_inline bool
640 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
641 memory_order __m1,
642 memory_order __m2) volatile noexcept
643 { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
644
645 - __always_inline bool
646 + __libitm_always_inline bool
647 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
648 memory_order __m = memory_order_seq_cst) noexcept
649 {
650 @@ -1227,7 +1226,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
651 __calculate_memory_order(__m));
652 }
653
654 - __always_inline bool
655 + __libitm_always_inline bool
656 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
657 memory_order __m = memory_order_seq_cst) volatile noexcept
658 {
659 @@ -1235,22 +1234,22 @@ namespace std // _GLIBCXX_VISIBILITY(default)
660 __calculate_memory_order(__m));
661 }
662
663 - __always_inline __pointer_type
664 + __libitm_always_inline __pointer_type
665 fetch_add(ptrdiff_t __d,
666 memory_order __m = memory_order_seq_cst) noexcept
667 { return _M_b.fetch_add(__d, __m); }
668
669 - __always_inline __pointer_type
670 + __libitm_always_inline __pointer_type
671 fetch_add(ptrdiff_t __d,
672 memory_order __m = memory_order_seq_cst) volatile noexcept
673 { return _M_b.fetch_add(__d, __m); }
674
675 - __always_inline __pointer_type
676 + __libitm_always_inline __pointer_type
677 fetch_sub(ptrdiff_t __d,
678 memory_order __m = memory_order_seq_cst) noexcept
679 { return _M_b.fetch_sub(__d, __m); }
680
681 - __always_inline __pointer_type
682 + __libitm_always_inline __pointer_type
683 fetch_sub(ptrdiff_t __d,
684 memory_order __m = memory_order_seq_cst) volatile noexcept
685 { return _M_b.fetch_sub(__d, __m); }
686 @@ -1544,98 +1543,98 @@ namespace std // _GLIBCXX_VISIBILITY(default)
687
688
689 // Function definitions, atomic_flag operations.
690 - inline __always_inline bool
691 + inline __libitm_always_inline bool
692 atomic_flag_test_and_set_explicit(atomic_flag* __a,
693 memory_order __m) noexcept
694 { return __a->test_and_set(__m); }
695
696 - inline __always_inline bool
697 + inline __libitm_always_inline bool
698 atomic_flag_test_and_set_explicit(volatile atomic_flag* __a,
699 memory_order __m) noexcept
700 { return __a->test_and_set(__m); }
701
702 - inline __always_inline void
703 + inline __libitm_always_inline void
704 atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept
705 { __a->clear(__m); }
706
707 - inline __always_inline void
708 + inline __libitm_always_inline void
709 atomic_flag_clear_explicit(volatile atomic_flag* __a,
710 memory_order __m) noexcept
711 { __a->clear(__m); }
712
713 - inline __always_inline bool
714 + inline __libitm_always_inline bool
715 atomic_flag_test_and_set(atomic_flag* __a) noexcept
716 { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
717
718 - inline __always_inline bool
719 + inline __libitm_always_inline bool
720 atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept
721 { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
722
723 - inline __always_inline void
724 + inline __libitm_always_inline void
725 atomic_flag_clear(atomic_flag* __a) noexcept
726 { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
727
728 - inline __always_inline void
729 + inline __libitm_always_inline void
730 atomic_flag_clear(volatile atomic_flag* __a) noexcept
731 { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
732
733
734 // Function templates generally applicable to atomic types.
735 template<typename _ITp>
736 - __always_inline bool
737 + __libitm_always_inline bool
738 atomic_is_lock_free(const atomic<_ITp>* __a) noexcept
739 { return __a->is_lock_free(); }
740
741 template<typename _ITp>
742 - __always_inline bool
743 + __libitm_always_inline bool
744 atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept
745 { return __a->is_lock_free(); }
746
747 template<typename _ITp>
748 - __always_inline void
749 + __libitm_always_inline void
750 atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept;
751
752 template<typename _ITp>
753 - __always_inline void
754 + __libitm_always_inline void
755 atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept;
756
757 template<typename _ITp>
758 - __always_inline void
759 + __libitm_always_inline void
760 atomic_store_explicit(atomic<_ITp>* __a, _ITp __i,
761 memory_order __m) noexcept
762 { __a->store(__i, __m); }
763
764 template<typename _ITp>
765 - __always_inline void
766 + __libitm_always_inline void
767 atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i,
768 memory_order __m) noexcept
769 { __a->store(__i, __m); }
770
771 template<typename _ITp>
772 - __always_inline _ITp
773 + __libitm_always_inline _ITp
774 atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept
775 { return __a->load(__m); }
776
777 template<typename _ITp>
778 - __always_inline _ITp
779 + __libitm_always_inline _ITp
780 atomic_load_explicit(const volatile atomic<_ITp>* __a,
781 memory_order __m) noexcept
782 { return __a->load(__m); }
783
784 template<typename _ITp>
785 - __always_inline _ITp
786 + __libitm_always_inline _ITp
787 atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i,
788 memory_order __m) noexcept
789 { return __a->exchange(__i, __m); }
790
791 template<typename _ITp>
792 - __always_inline _ITp
793 + __libitm_always_inline _ITp
794 atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i,
795 memory_order __m) noexcept
796 { return __a->exchange(__i, __m); }
797
798 template<typename _ITp>
799 - __always_inline bool
800 + __libitm_always_inline bool
801 atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a,
802 _ITp* __i1, _ITp __i2,
803 memory_order __m1,
804 @@ -1643,7 +1642,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
805 { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
806
807 template<typename _ITp>
808 - __always_inline bool
809 + __libitm_always_inline bool
810 atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a,
811 _ITp* __i1, _ITp __i2,
812 memory_order __m1,
813 @@ -1651,7 +1650,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
814 { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
815
816 template<typename _ITp>
817 - __always_inline bool
818 + __libitm_always_inline bool
819 atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a,
820 _ITp* __i1, _ITp __i2,
821 memory_order __m1,
822 @@ -1659,7 +1658,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
823 { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
824
825 template<typename _ITp>
826 - __always_inline bool
827 + __libitm_always_inline bool
828 atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a,
829 _ITp* __i1, _ITp __i2,
830 memory_order __m1,
831 @@ -1668,37 +1667,37 @@ namespace std // _GLIBCXX_VISIBILITY(default)
832
833
834 template<typename _ITp>
835 - __always_inline void
836 + __libitm_always_inline void
837 atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept
838 { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
839
840 template<typename _ITp>
841 - __always_inline void
842 + __libitm_always_inline void
843 atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept
844 { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
845
846 template<typename _ITp>
847 - __always_inline _ITp
848 + __libitm_always_inline _ITp
849 atomic_load(const atomic<_ITp>* __a) noexcept
850 { return atomic_load_explicit(__a, memory_order_seq_cst); }
851
852 template<typename _ITp>
853 - __always_inline _ITp
854 + __libitm_always_inline _ITp
855 atomic_load(const volatile atomic<_ITp>* __a) noexcept
856 { return atomic_load_explicit(__a, memory_order_seq_cst); }
857
858 template<typename _ITp>
859 - __always_inline _ITp
860 + __libitm_always_inline _ITp
861 atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept
862 { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
863
864 template<typename _ITp>
865 - __always_inline _ITp
866 + __libitm_always_inline _ITp
867 atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept
868 { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
869
870 template<typename _ITp>
871 - __always_inline bool
872 + __libitm_always_inline bool
873 atomic_compare_exchange_weak(atomic<_ITp>* __a,
874 _ITp* __i1, _ITp __i2) noexcept
875 {
876 @@ -1708,7 +1707,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
877 }
878
879 template<typename _ITp>
880 - __always_inline bool
881 + __libitm_always_inline bool
882 atomic_compare_exchange_weak(volatile atomic<_ITp>* __a,
883 _ITp* __i1, _ITp __i2) noexcept
884 {
885 @@ -1718,7 +1717,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
886 }
887
888 template<typename _ITp>
889 - __always_inline bool
890 + __libitm_always_inline bool
891 atomic_compare_exchange_strong(atomic<_ITp>* __a,
892 _ITp* __i1, _ITp __i2) noexcept
893 {
894 @@ -1728,7 +1727,7 @@ namespace std // _GLIBCXX_VISIBILITY(default)
895 }
896
897 template<typename _ITp>
898 - __always_inline bool
899 + __libitm_always_inline bool
900 atomic_compare_exchange_strong(volatile atomic<_ITp>* __a,
901 _ITp* __i1, _ITp __i2) noexcept
902 {
903 @@ -1742,158 +1741,158 @@ namespace std // _GLIBCXX_VISIBILITY(default)
904 // intergral types as specified in the standard, excluding address
905 // types.
906 template<typename _ITp>
907 - __always_inline _ITp
908 + __libitm_always_inline _ITp
909 atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i,
910 memory_order __m) noexcept
911 { return __a->fetch_add(__i, __m); }
912
913 template<typename _ITp>
914 - __always_inline _ITp
915 + __libitm_always_inline _ITp
916 atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
917 memory_order __m) noexcept
918 { return __a->fetch_add(__i, __m); }
919
920 template<typename _ITp>
921 - __always_inline _ITp
922 + __libitm_always_inline _ITp
923 atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i,
924 memory_order __m) noexcept
925 { return __a->fetch_sub(__i, __m); }
926
927 template<typename _ITp>
928 - __always_inline _ITp
929 + __libitm_always_inline _ITp
930 atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
931 memory_order __m) noexcept
932 { return __a->fetch_sub(__i, __m); }
933
934 template<typename _ITp>
935 - __always_inline _ITp
936 + __libitm_always_inline _ITp
937 atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i,
938 memory_order __m) noexcept
939 { return __a->fetch_and(__i, __m); }
940
941 template<typename _ITp>
942 - __always_inline _ITp
943 + __libitm_always_inline _ITp
944 atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
945 memory_order __m) noexcept
946 { return __a->fetch_and(__i, __m); }
947
948 template<typename _ITp>
949 - __always_inline _ITp
950 + __libitm_always_inline _ITp
951 atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i,
952 memory_order __m) noexcept
953 { return __a->fetch_or(__i, __m); }
954
955 template<typename _ITp>
956 - __always_inline _ITp
957 + __libitm_always_inline _ITp
958 atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
959 memory_order __m) noexcept
960 { return __a->fetch_or(__i, __m); }
961
962 template<typename _ITp>
963 - __always_inline _ITp
964 + __libitm_always_inline _ITp
965 atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i,
966 memory_order __m) noexcept
967 { return __a->fetch_xor(__i, __m); }
968
969 template<typename _ITp>
970 - __always_inline _ITp
971 + __libitm_always_inline _ITp
972 atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
973 memory_order __m) noexcept
974 { return __a->fetch_xor(__i, __m); }
975
976 template<typename _ITp>
977 - __always_inline _ITp
978 + __libitm_always_inline _ITp
979 atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept
980 { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
981
982 template<typename _ITp>
983 - __always_inline _ITp
984 + __libitm_always_inline _ITp
985 atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept
986 { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
987
988 template<typename _ITp>
989 - __always_inline _ITp
990 + __libitm_always_inline _ITp
991 atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept
992 { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
993
994 template<typename _ITp>
995 - __always_inline _ITp
996 + __libitm_always_inline _ITp
997 atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept
998 { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
999
1000 template<typename _ITp>
1001 - __always_inline _ITp
1002 + __libitm_always_inline _ITp
1003 atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept
1004 { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
1005
1006 template<typename _ITp>
1007 - __always_inline _ITp
1008 + __libitm_always_inline _ITp
1009 atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept
1010 { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
1011
1012 template<typename _ITp>
1013 - __always_inline _ITp
1014 + __libitm_always_inline _ITp
1015 atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept
1016 { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
1017
1018 template<typename _ITp>
1019 - __always_inline _ITp
1020 + __libitm_always_inline _ITp
1021 atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept
1022 { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
1023
1024 template<typename _ITp>
1025 - __always_inline _ITp
1026 + __libitm_always_inline _ITp
1027 atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept
1028 { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
1029
1030 template<typename _ITp>
1031 - __always_inline _ITp
1032 + __libitm_always_inline _ITp
1033 atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept
1034 { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
1035
1036
1037 // Partial specializations for pointers.
1038 template<typename _ITp>
1039 - __always_inline _ITp*
1040 + __libitm_always_inline _ITp*
1041 atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d,
1042 memory_order __m) noexcept
1043 { return __a->fetch_add(__d, __m); }
1044
1045 template<typename _ITp>
1046 - __always_inline _ITp*
1047 + __libitm_always_inline _ITp*
1048 atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d,
1049 memory_order __m) noexcept
1050 { return __a->fetch_add(__d, __m); }
1051
1052 template<typename _ITp>
1053 - __always_inline _ITp*
1054 + __libitm_always_inline _ITp*
1055 atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept
1056 { return __a->fetch_add(__d); }
1057
1058 template<typename _ITp>
1059 - __always_inline _ITp*
1060 + __libitm_always_inline _ITp*
1061 atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept
1062 { return __a->fetch_add(__d); }
1063
1064 template<typename _ITp>
1065 - __always_inline _ITp*
1066 + __libitm_always_inline _ITp*
1067 atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a,
1068 ptrdiff_t __d, memory_order __m) noexcept
1069 { return __a->fetch_sub(__d, __m); }
1070
1071 template<typename _ITp>
1072 - __always_inline _ITp*
1073 + __libitm_always_inline _ITp*
1074 atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d,
1075 memory_order __m) noexcept
1076 { return __a->fetch_sub(__d, __m); }
1077
1078 template<typename _ITp>
1079 - __always_inline _ITp*
1080 + __libitm_always_inline _ITp*
1081 atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept
1082 { return __a->fetch_sub(__d); }
1083
1084 template<typename _ITp>
1085 - __always_inline _ITp*
1086 + __libitm_always_inline _ITp*
1087 atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept
1088 { return __a->fetch_sub(__d); }
1089 // @} group atomics
1090 --
1091 2.19.2
1092