cas32weak.hpp
Go to the documentation of this file.
1 #ifndef BOOST_DETAIL_ATOMIC_CAS32WEAK_HPP
2 #define BOOST_DETAIL_ATOMIC_CAS32WEAK_HPP
3 
4 // Distributed under the Boost Software License, Version 1.0.
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // Copyright (c) 2011 Helge Bahmann
9 
10 #include <boost/memory_order.hpp>
12 
13 namespace boost {
14 namespace detail {
15 namespace atomic {
16 
17 /* integral types */
18 
19 template<typename T, bool Sign>
20 class base_atomic<T, int, 1, Sign> {
22  typedef T value_type;
23  typedef T difference_type;
24  typedef uint32_t storage_type;
25 public:
26  explicit base_atomic(value_type v) : v_(v) {}
27  base_atomic(void) {}
28 
29  void
30  store(value_type v, memory_order order = memory_order_seq_cst) volatile
31  {
33  const_cast<volatile storage_type &>(v_) = v;
35  }
36 
37  value_type
38  load(memory_order order = memory_order_seq_cst) const volatile
39  {
40  value_type v = const_cast<const volatile storage_type &>(v_);
42  return v;
43  }
44 
45  value_type
46  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
47  {
48  value_type original = load(memory_order_relaxed);
49  do {
50  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
51  return original;
52  }
53 
54  bool
56  value_type & expected,
57  value_type desired,
58  memory_order success_order,
59  memory_order failure_order) volatile
60  {
61  platform_fence_before(success_order);
62 
63  storage_type expected_s = (storage_type) expected;
64  storage_type desired_s = (storage_type) desired;
65 
66  bool success = platform_cmpxchg32(expected_s, desired_s, &v_);
67 
68  if (success) {
69  platform_fence_after(success_order);
70  } else {
71  platform_fence_after(failure_order);
72  expected = (value_type) expected_s;
73  }
74 
75  return success;
76  }
77 
78  bool
80  value_type & expected,
81  value_type desired,
82  memory_order success_order,
83  memory_order failure_order) volatile
84  {
85  for(;;) {
86  value_type tmp = expected;
87  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
88  return true;
89  if (tmp != expected) {
90  expected = tmp;
91  return false;
92  }
93  }
94  }
95 
96  value_type
97  fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile
98  {
99  value_type original = load(memory_order_relaxed);
100  do {
101  } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed));
102  return original;
103  }
104 
105  value_type
106  fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile
107  {
108  value_type original = load(memory_order_relaxed);
109  do {
110  } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed));
111  return original;
112  }
113 
114  value_type
115  fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile
116  {
117  value_type original = load(memory_order_relaxed);
118  do {
119  } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed));
120  return original;
121  }
122 
123  value_type
124  fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile
125  {
126  value_type original = load(memory_order_relaxed);
127  do {
128  } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed));
129  return original;
130  }
131 
132  value_type
133  fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile
134  {
135  value_type original = load(memory_order_relaxed);
136  do {
137  } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed));
138  return original;
139  }
140 
141  bool
142  is_lock_free(void) const volatile
143  {
144  return true;
145  }
146 
148 private:
149  base_atomic(const base_atomic &) /* = delete */ ;
150  void operator=(const base_atomic &) /* = delete */ ;
151  storage_type v_;
152 };
153 
154 template<typename T, bool Sign>
155 class base_atomic<T, int, 2, Sign> {
157  typedef T value_type;
158  typedef T difference_type;
159  typedef uint32_t storage_type;
160 public:
161  explicit base_atomic(value_type v) : v_(v) {}
162  base_atomic(void) {}
163 
164  void
165  store(value_type v, memory_order order = memory_order_seq_cst) volatile
166  {
168  const_cast<volatile storage_type &>(v_) = v;
170  }
171 
172  value_type
173  load(memory_order order = memory_order_seq_cst) const volatile
174  {
175  value_type v = const_cast<const volatile storage_type &>(v_);
177  return v;
178  }
179 
180  value_type
181  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
182  {
183  value_type original = load(memory_order_relaxed);
184  do {
185  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
186  return original;
187  }
188 
189  bool
191  value_type & expected,
192  value_type desired,
193  memory_order success_order,
194  memory_order failure_order) volatile
195  {
196  platform_fence_before(success_order);
197 
198  storage_type expected_s = (storage_type) expected;
199  storage_type desired_s = (storage_type) desired;
200 
201  bool success = platform_cmpxchg32(expected_s, desired_s, &v_);
202 
203  if (success) {
204  platform_fence_after(success_order);
205  } else {
206  platform_fence_after(failure_order);
207  expected = (value_type) expected_s;
208  }
209 
210  return success;
211  }
212 
213  bool
215  value_type & expected,
216  value_type desired,
217  memory_order success_order,
218  memory_order failure_order) volatile
219  {
220  for(;;) {
221  value_type tmp = expected;
222  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
223  return true;
224  if (tmp != expected) {
225  expected = tmp;
226  return false;
227  }
228  }
229  }
230 
231  value_type
232  fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile
233  {
234  value_type original = load(memory_order_relaxed);
235  do {
236  } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed));
237  return original;
238  }
239 
240  value_type
241  fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile
242  {
243  value_type original = load(memory_order_relaxed);
244  do {
245  } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed));
246  return original;
247  }
248 
249  value_type
250  fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile
251  {
252  value_type original = load(memory_order_relaxed);
253  do {
254  } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed));
255  return original;
256  }
257 
258  value_type
259  fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile
260  {
261  value_type original = load(memory_order_relaxed);
262  do {
263  } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed));
264  return original;
265  }
266 
267  value_type
268  fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile
269  {
270  value_type original = load(memory_order_relaxed);
271  do {
272  } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed));
273  return original;
274  }
275 
276  bool
277  is_lock_free(void) const volatile
278  {
279  return true;
280  }
281 
283 private:
284  base_atomic(const base_atomic &) /* = delete */ ;
285  void operator=(const base_atomic &) /* = delete */ ;
286  storage_type v_;
287 };
288 
289 template<typename T, bool Sign>
290 class base_atomic<T, int, 4, Sign> {
292  typedef T value_type;
293  typedef T difference_type;
294 public:
295  explicit base_atomic(value_type v) : v_(v) {}
296  base_atomic(void) {}
297 
298  void
299  store(value_type v, memory_order order = memory_order_seq_cst) volatile
300  {
302  const_cast<volatile value_type &>(v_) = v;
304  }
305 
306  value_type
307  load(memory_order order = memory_order_seq_cst) const volatile
308  {
309  value_type v = const_cast<const volatile value_type &>(v_);
311  return v;
312  }
313 
314  value_type
315  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
316  {
317  value_type original = load(memory_order_relaxed);
318  do {
319  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
320  return original;
321  }
322 
323  bool
325  value_type & expected,
326  value_type desired,
327  memory_order success_order,
328  memory_order failure_order) volatile
329  {
330  platform_fence_before(success_order);
331 
332  bool success = platform_cmpxchg32(expected, desired, &v_);
333 
334  if (success) {
335  platform_fence_after(success_order);
336  } else {
337  platform_fence_after(failure_order);
338  }
339 
340  return success;
341  }
342 
343  bool
345  value_type & expected,
346  value_type desired,
347  memory_order success_order,
348  memory_order failure_order) volatile
349  {
350  for(;;) {
351  value_type tmp = expected;
352  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
353  return true;
354  if (tmp != expected) {
355  expected = tmp;
356  return false;
357  }
358  }
359  }
360 
361  value_type
362  fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile
363  {
364  value_type original = load(memory_order_relaxed);
365  do {
366  } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed));
367  return original;
368  }
369 
370  value_type
371  fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile
372  {
373  value_type original = load(memory_order_relaxed);
374  do {
375  } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed));
376  return original;
377  }
378 
379  value_type
380  fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile
381  {
382  value_type original = load(memory_order_relaxed);
383  do {
384  } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed));
385  return original;
386  }
387 
388  value_type
389  fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile
390  {
391  value_type original = load(memory_order_relaxed);
392  do {
393  } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed));
394  return original;
395  }
396 
397  value_type
398  fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile
399  {
400  value_type original = load(memory_order_relaxed);
401  do {
402  } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed));
403  return original;
404  }
405 
406  bool
407  is_lock_free(void) const volatile
408  {
409  return true;
410  }
411 
413 private:
414  base_atomic(const base_atomic &) /* = delete */ ;
415  void operator=(const base_atomic &) /* = delete */ ;
416  value_type v_;
417 };
418 
419 /* pointer types */
420 
421 template<bool Sign>
422 class base_atomic<void *, void *, 4, Sign> {
424  typedef void * value_type;
425  typedef ptrdiff_t difference_type;
426 public:
427  explicit base_atomic(value_type v) : v_(v) {}
428  base_atomic(void) {}
429 
430  void
431  store(value_type v, memory_order order = memory_order_seq_cst) volatile
432  {
434  const_cast<volatile value_type &>(v_) = v;
436  }
437 
438  value_type
439  load(memory_order order = memory_order_seq_cst) const volatile
440  {
441  value_type v = const_cast<const volatile value_type &>(v_);
443  return v;
444  }
445 
446  value_type
447  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
448  {
449  value_type original = load(memory_order_relaxed);
450  do {
451  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
452  return original;
453  }
454 
455  bool
457  value_type & expected,
458  value_type desired,
459  memory_order success_order,
460  memory_order failure_order) volatile
461  {
462  platform_fence_before(success_order);
463 
464  bool success = platform_cmpxchg32(expected, desired, &v_);
465 
466  if (success) {
467  platform_fence_after(success_order);
468  } else {
469  platform_fence_after(failure_order);
470  }
471 
472  return success;
473  }
474 
475  bool
477  value_type & expected,
478  value_type desired,
479  memory_order success_order,
480  memory_order failure_order) volatile
481  {
482  for(;;) {
483  value_type tmp = expected;
484  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
485  return true;
486  if (tmp != expected) {
487  expected = tmp;
488  return false;
489  }
490  }
491  }
492 
493  value_type
494  fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile
495  {
496  value_type original = load(memory_order_relaxed);
497  do {
498  } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed));
499  return original;
500  }
501 
502  value_type
503  fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile
504  {
505  value_type original = load(memory_order_relaxed);
506  do {
507  } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed));
508  return original;
509  }
510 
511  bool
512  is_lock_free(void) const volatile
513  {
514  return true;
515  }
516 
518 private:
519  base_atomic(const base_atomic &) /* = delete */ ;
520  void operator=(const base_atomic &) /* = delete */ ;
521  value_type v_;
522 };
523 
524 template<typename T, bool Sign>
525 class base_atomic<T *, void *, 4, Sign> {
527  typedef T * value_type;
528  typedef ptrdiff_t difference_type;
529 public:
530  explicit base_atomic(value_type v) : v_(v) {}
531  base_atomic(void) {}
532 
533  void
534  store(value_type v, memory_order order = memory_order_seq_cst) volatile
535  {
537  const_cast<volatile value_type &>(v_) = v;
539  }
540 
541  value_type
542  load(memory_order order = memory_order_seq_cst) const volatile
543  {
544  value_type v = const_cast<const volatile value_type &>(v_);
546  return v;
547  }
548 
549  value_type
550  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
551  {
552  value_type original = load(memory_order_relaxed);
553  do {
554  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
555  return original;
556  }
557 
558  bool
560  value_type & expected,
561  value_type desired,
562  memory_order success_order,
563  memory_order failure_order) volatile
564  {
565  platform_fence_before(success_order);
566 
567  bool success = platform_cmpxchg32(expected, desired, &v_);
568 
569  if (success) {
570  platform_fence_after(success_order);
571  } else {
572  platform_fence_after(failure_order);
573  }
574 
575  return success;
576  }
577 
578  bool
580  value_type & expected,
581  value_type desired,
582  memory_order success_order,
583  memory_order failure_order) volatile
584  {
585  for(;;) {
586  value_type tmp = expected;
587  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
588  return true;
589  if (tmp != expected) {
590  expected = tmp;
591  return false;
592  }
593  }
594  }
595 
596  value_type
597  fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile
598  {
599  value_type original = load(memory_order_relaxed);
600  do {
601  } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed));
602  return original;
603  }
604 
605  value_type
606  fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile
607  {
608  value_type original = load(memory_order_relaxed);
609  do {
610  } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed));
611  return original;
612  }
613 
614  bool
615  is_lock_free(void) const volatile
616  {
617  return true;
618  }
619 
621 private:
622  base_atomic(const base_atomic &) /* = delete */ ;
623  void operator=(const base_atomic &) /* = delete */ ;
624  value_type v_;
625 };
626 
627 /* generic types */
628 
629 template<typename T, bool Sign>
630 class base_atomic<T, void, 1, Sign> {
632  typedef T value_type;
633  typedef uint32_t storage_type;
634 public:
635  explicit base_atomic(value_type v) : v_(0)
636  {
637  memcpy(&v_, &v, sizeof(value_type));
638  }
639  base_atomic(void) : v_(0) {}
640 
641  void
642  store(value_type v, memory_order order = memory_order_seq_cst) volatile
643  {
644  storage_type tmp = 0;
645  memcpy(&tmp, &v, sizeof(value_type));
647  const_cast<volatile storage_type &>(v_) = tmp;
649  }
650 
651  value_type
652  load(memory_order order = memory_order_seq_cst) const volatile
653  {
654  storage_type tmp = const_cast<const volatile storage_type &>(v_);
656 
657  value_type v;
658  memcpy(&v, &tmp, sizeof(value_type));
659  return v;
660  }
661 
662  value_type
663  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
664  {
665  value_type original = load(memory_order_relaxed);
666  do {
667  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
668  return original;
669  }
670 
671  bool
673  value_type & expected,
674  value_type desired,
675  memory_order success_order,
676  memory_order failure_order) volatile
677  {
678  storage_type expected_s = 0, desired_s = 0;
679  memcpy(&expected_s, &expected, sizeof(value_type));
680  memcpy(&desired_s, &desired, sizeof(value_type));
681 
682  platform_fence_before(success_order);
683 
684  bool success = platform_cmpxchg32(expected_s, desired_s, &v_);
685 
686  if (success) {
687  platform_fence_after(success_order);
688  } else {
689  platform_fence_after(failure_order);
690  memcpy(&expected, &expected_s, sizeof(value_type));
691  }
692 
693  return success;
694  }
695 
696  bool
698  value_type & expected,
699  value_type desired,
700  memory_order success_order,
701  memory_order failure_order) volatile
702  {
703  for(;;) {
704  value_type tmp = expected;
705  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
706  return true;
707  if (tmp != expected) {
708  expected = tmp;
709  return false;
710  }
711  }
712  }
713 
714  bool
715  is_lock_free(void) const volatile
716  {
717  return true;
718  }
719 
721 private:
722  base_atomic(const base_atomic &) /* = delete */ ;
723  void operator=(const base_atomic &) /* = delete */ ;
724  storage_type v_;
725 };
726 
727 template<typename T, bool Sign>
728 class base_atomic<T, void, 2, Sign> {
730  typedef T value_type;
731  typedef uint32_t storage_type;
732 public:
733  explicit base_atomic(value_type v) : v_(0)
734  {
735  memcpy(&v_, &v, sizeof(value_type));
736  }
737  base_atomic(void) : v_(0) {}
738 
739  void
740  store(value_type v, memory_order order = memory_order_seq_cst) volatile
741  {
742  storage_type tmp = 0;
743  memcpy(&tmp, &v, sizeof(value_type));
745  const_cast<volatile storage_type &>(v_) = tmp;
747  }
748 
749  value_type
750  load(memory_order order = memory_order_seq_cst) const volatile
751  {
752  storage_type tmp = const_cast<const volatile storage_type &>(v_);
754 
755  value_type v;
756  memcpy(&v, &tmp, sizeof(value_type));
757  return v;
758  }
759 
760  value_type
761  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
762  {
763  value_type original = load(memory_order_relaxed);
764  do {
765  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
766  return original;
767  }
768 
769  bool
771  value_type & expected,
772  value_type desired,
773  memory_order success_order,
774  memory_order failure_order) volatile
775  {
776  storage_type expected_s = 0, desired_s = 0;
777  memcpy(&expected_s, &expected, sizeof(value_type));
778  memcpy(&desired_s, &desired, sizeof(value_type));
779 
780  platform_fence_before(success_order);
781 
782  bool success = platform_cmpxchg32(expected_s, desired_s, &v_);
783 
784  if (success) {
785  platform_fence_after(success_order);
786  } else {
787  platform_fence_after(failure_order);
788  memcpy(&expected, &expected_s, sizeof(value_type));
789  }
790 
791  return success;
792  }
793 
794  bool
796  value_type & expected,
797  value_type desired,
798  memory_order success_order,
799  memory_order failure_order) volatile
800  {
801  for(;;) {
802  value_type tmp = expected;
803  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
804  return true;
805  if (tmp != expected) {
806  expected = tmp;
807  return false;
808  }
809  }
810  }
811 
812  bool
813  is_lock_free(void) const volatile
814  {
815  return true;
816  }
817 
819 private:
820  base_atomic(const base_atomic &) /* = delete */ ;
821  void operator=(const base_atomic &) /* = delete */ ;
822  storage_type v_;
823 };
824 
825 template<typename T, bool Sign>
826 class base_atomic<T, void, 4, Sign> {
828  typedef T value_type;
829  typedef uint32_t storage_type;
830 public:
831  explicit base_atomic(value_type v) : v_(0)
832  {
833  memcpy(&v_, &v, sizeof(value_type));
834  }
835  base_atomic(void) : v_(0) {}
836 
837  void
838  store(value_type v, memory_order order = memory_order_seq_cst) volatile
839  {
840  storage_type tmp = 0;
841  memcpy(&tmp, &v, sizeof(value_type));
843  const_cast<volatile storage_type &>(v_) = tmp;
845  }
846 
847  value_type
848  load(memory_order order = memory_order_seq_cst) const volatile
849  {
850  storage_type tmp = const_cast<const volatile storage_type &>(v_);
852 
853  value_type v;
854  memcpy(&v, &tmp, sizeof(value_type));
855  return v;
856  }
857 
858  value_type
859  exchange(value_type v, memory_order order = memory_order_seq_cst) volatile
860  {
861  value_type original = load(memory_order_relaxed);
862  do {
863  } while (!compare_exchange_weak(original, v, order, memory_order_relaxed));
864  return original;
865  }
866 
867  bool
869  value_type & expected,
870  value_type desired,
871  memory_order success_order,
872  memory_order failure_order) volatile
873  {
874  storage_type expected_s = 0, desired_s = 0;
875  memcpy(&expected_s, &expected, sizeof(value_type));
876  memcpy(&desired_s, &desired, sizeof(value_type));
877 
878  platform_fence_before(success_order);
879 
880  bool success = platform_cmpxchg32(expected_s, desired_s, &v_);
881 
882  if (success) {
883  platform_fence_after(success_order);
884  } else {
885  platform_fence_after(failure_order);
886  memcpy(&expected, &expected_s, sizeof(value_type));
887  }
888 
889  return success;
890  }
891 
892  bool
894  value_type & expected,
895  value_type desired,
896  memory_order success_order,
897  memory_order failure_order) volatile
898  {
899  for(;;) {
900  value_type tmp = expected;
901  if (compare_exchange_weak(tmp, desired, success_order, failure_order))
902  return true;
903  if (tmp != expected) {
904  expected = tmp;
905  return false;
906  }
907  }
908  }
909 
910  bool
911  is_lock_free(void) const volatile
912  {
913  return true;
914  }
915 
917 private:
918  base_atomic(const base_atomic &) /* = delete */ ;
919  void operator=(const base_atomic &) /* = delete */ ;
920  storage_type v_;
921 };
922 
923 }
924 }
925 }
926 
927 #endif
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:761
static void platform_fence_before_store(memory_order order)
Definition: gcc-armv6+.hpp:128
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:697
value_type fetch_xor(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:268
value_type fetch_sub(difference_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:503
Definition: base.hpp:116
value_type fetch_or(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:124
static void platform_fence_after_load(memory_order order)
Definition: gcc-armv6+.hpp:141
value_type fetch_or(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:259
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:893
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:439
static void platform_fence_after_store(memory_order order)
Definition: gcc-armv6+.hpp:134
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:652
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:456
value_type fetch_and(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:250
value_type fetch_and(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:115
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:165
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:299
value_type fetch_add(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:97
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:838
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:46
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:173
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:181
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:476
value_type fetch_add(difference_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:494
#define BOOST_ATOMIC_DECLARE_POINTER_OPERATORS
Definition: base.hpp:107
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:214
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:550
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:859
value_type load(memory_order=memory_order_seq_cst) volatileconst
Definition: base.hpp:156
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:534
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:30
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:559
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:344
value_type fetch_sub(difference_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:606
value_type fetch_sub(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:371
static void platform_fence_after(memory_order order)
Definition: gcc-armv6+.hpp:116
#define BOOST_ATOMIC_DECLARE_BASE_OPERATORS
Definition: base.hpp:19
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:868
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:190
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:770
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:672
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:642
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:315
value_type fetch_or(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:389
value_type fetch_xor(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:398
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:55
bool platform_cmpxchg32(T &expected, T desired, volatile T *ptr)
Definition: gcc-armv6+.hpp:148
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:324
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: base.hpp:184
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:79
value_type fetch_xor(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:133
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:750
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:579
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:431
#define BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS
Definition: base.hpp:111
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
Definition: cas32weak.hpp:795
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:542
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:848
static void platform_fence_before(memory_order order)
Definition: gcc-armv6+.hpp:103
value_type fetch_add(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:362
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:38
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:447
value_type load(memory_order order=memory_order_seq_cst) const volatile
Definition: cas32weak.hpp:307
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:740
value_type fetch_add(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:232
value_type fetch_add(difference_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:597
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:663
void operator=(const base_atomic &)
value_type fetch_sub(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:106
value_type fetch_and(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:380
value_type fetch_sub(value_type v, memory_order order=memory_order_seq_cst) volatile
Definition: cas32weak.hpp:241


rosatomic
Author(s): Josh Faust
autogenerated on Mon Jun 10 2019 14:44:41