/src/harfbuzz/src/hb-atomic.hh
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright © 2007 Chris Wilson |
3 | | * Copyright © 2009,2010 Red Hat, Inc. |
4 | | * Copyright © 2011,2012 Google, Inc. |
5 | | * |
6 | | * This is part of HarfBuzz, a text shaping library. |
7 | | * |
8 | | * Permission is hereby granted, without written agreement and without |
9 | | * license or royalty fees, to use, copy, modify, and distribute this |
10 | | * software and its documentation for any purpose, provided that the |
11 | | * above copyright notice and the following two paragraphs appear in |
12 | | * all copies of this software. |
13 | | * |
14 | | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
15 | | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
16 | | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
17 | | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
18 | | * DAMAGE. |
19 | | * |
20 | | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
21 | | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
22 | | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
23 | | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
24 | | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
25 | | * |
26 | | * Contributor(s): |
27 | | * Chris Wilson <chris@chris-wilson.co.uk> |
28 | | * Red Hat Author(s): Behdad Esfahbod |
29 | | * Google Author(s): Behdad Esfahbod |
30 | | */ |
31 | | |
32 | | #ifndef HB_ATOMIC_HH |
33 | | #define HB_ATOMIC_HH |
34 | | |
35 | | #include "hb.hh" |
36 | | #include "hb-meta.hh" |
37 | | |
38 | | |
39 | | /* |
40 | | * Atomic integers and pointers. |
41 | | */ |
42 | | |
43 | | |
44 | | /* We need external help for these */ |
45 | | |
46 | | #if defined(hb_atomic_int_impl_add) \ |
47 | | && defined(hb_atomic_ptr_impl_get) \ |
48 | | && defined(hb_atomic_ptr_impl_cmpexch) |
49 | | |
50 | | /* Defined externally, i.e. in config.h. */ |
51 | | |
52 | | |
53 | | #elif !defined(HB_NO_MT) && defined(__ATOMIC_ACQUIRE) |
54 | | |
55 | | /* C++11-style GCC primitives. We prefer these as they don't require linking to libstdc++ / libc++. */ |
56 | | |
57 | | #define _hb_memory_barrier() __sync_synchronize () |
58 | | |
59 | 3.95M | #define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add ((AI), (V), __ATOMIC_ACQ_REL) |
60 | 1.49M | #define hb_atomic_int_impl_set_relaxed(AI, V) __atomic_store_n ((AI), (V), __ATOMIC_RELAXED) |
61 | 0 | #define hb_atomic_int_impl_set(AI, V) __atomic_store_n ((AI), (V), __ATOMIC_RELEASE) |
62 | 18.3M | #define hb_atomic_int_impl_get_relaxed(AI) __atomic_load_n ((AI), __ATOMIC_RELAXED) |
63 | 0 | #define hb_atomic_int_impl_get(AI) __atomic_load_n ((AI), __ATOMIC_ACQUIRE) |
64 | | |
65 | 2.65M | #define hb_atomic_ptr_impl_set_relaxed(P, V) __atomic_store_n ((P), (V), __ATOMIC_RELAXED) |
66 | 30.6k | #define hb_atomic_ptr_impl_get_relaxed(P) __atomic_load_n ((P), __ATOMIC_RELAXED) |
67 | 7.05M | #define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_ACQUIRE) |
68 | | static inline bool |
69 | | _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) |
70 | 247k | { |
71 | 247k | const void *O = O_; // Need lvalue |
72 | 247k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); |
73 | 247k | } Unexecuted instantiation: hb-blob.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-buffer.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-common.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 24 | { | 71 | 24 | const void *O = O_; // Need lvalue | 72 | 24 | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 24 | } |
Unexecuted instantiation: hb-face.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-face-builder.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-fallback-shape.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-font.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 8.00k | { | 71 | 8.00k | const void *O = O_; // Need lvalue | 72 | 8.00k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 8.00k | } |
Unexecuted instantiation: hb-number.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-face.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-ot-font.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 2.30k | { | 71 | 2.30k | const void *O = O_; // Need lvalue | 72 | 2.30k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 2.30k | } |
Unexecuted instantiation: hb-outline.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-metrics.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-ot-shape.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 2.30k | { | 71 | 2.30k | const void *O = O_; // Need lvalue | 72 | 2.30k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 2.30k | } |
hb-ot-var.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 8.00k | { | 71 | 8.00k | const void *O = O_; // Need lvalue | 72 | 8.00k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 8.00k | } |
Unexecuted instantiation: hb-set.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-shape-plan.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 206k | { | 71 | 206k | const void *O = O_; // Need lvalue | 72 | 206k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 206k | } |
Unexecuted instantiation: hb-shape.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-shaper.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 1 | { | 71 | 1 | const void *O = O_; // Need lvalue | 72 | 1 | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 1 | } |
Unexecuted instantiation: hb-static.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-unicode.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ft.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-aat-layout.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 13.7k | { | 71 | 13.7k | const void *O = O_; // Need lvalue | 72 | 13.7k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 13.7k | } |
Unexecuted instantiation: hb-aat-map.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-buffer-verify.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-draw.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-paint.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-paint-bounded.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-paint-extents.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-cff1-table.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-cff2-table.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-ot-layout.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 7.09k | { | 71 | 7.09k | const void *O = O_; // Need lvalue | 72 | 7.09k | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 7.09k | } |
Unexecuted instantiation: hb-ot-map.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-ot-shaper-arabic.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 2 | { | 71 | 2 | const void *O = O_; // Need lvalue | 72 | 2 | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 2 | } |
Unexecuted instantiation: hb-ot-shaper-default.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-hangul.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-hebrew.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-indic.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-khmer.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-myanmar.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-syllabic.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-thai.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-use.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shape-fallback.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shape-normalize.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-tag.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) hb-ucd.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Line | Count | Source | 70 | 2 | { | 71 | 2 | const void *O = O_; // Need lvalue | 72 | 2 | return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); | 73 | 2 | } |
Unexecuted instantiation: hb-buffer-serialize.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) Unexecuted instantiation: hb-ot-shaper-indic-table.cc:_hb_atomic_ptr_impl_cmplexch(void const**, void const*, void const*) |
74 | 247k | #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N)) |
75 | | |
76 | | |
77 | | #elif !defined(HB_NO_MT) |
78 | | |
79 | | /* C++11 atomics. */ |
80 | | |
81 | | #include <atomic> |
82 | | |
83 | | #define _hb_memory_r_barrier() std::atomic_thread_fence(std::memory_order_acquire) |
84 | | #define _hb_memory_w_barrier() std::atomic_thread_fence(std::memory_order_release) |
85 | | |
86 | | #define hb_atomic_int_impl_add(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->fetch_add ((V), std::memory_order_acq_rel)) |
87 | | #define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_relaxed)) |
88 | | #define hb_atomic_int_impl_set(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_release)) |
89 | | #define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_relaxed)) |
90 | | #define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_acquire)) |
91 | | |
92 | | #define hb_atomic_ptr_impl_set_relaxed(P, V) (reinterpret_cast<std::atomic<void*> *> (P)->store ((V), std::memory_order_relaxed)) |
93 | | #define hb_atomic_ptr_impl_get_relaxed(P) (reinterpret_cast<std::atomic<void*> const *> (P)->load (std::memory_order_relaxed)) |
94 | | #define hb_atomic_ptr_impl_get(P) (reinterpret_cast<std::atomic<void*> *> (P)->load (std::memory_order_acquire)) |
95 | | static inline bool |
96 | | _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) |
97 | | { |
98 | | const void *O = O_; // Need lvalue |
99 | | return reinterpret_cast<std::atomic<const void*> *> (P)->compare_exchange_weak (O, N, std::memory_order_acq_rel, std::memory_order_relaxed); |
100 | | } |
101 | | #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N)) |
102 | | |
103 | | |
104 | | #else /* defined(HB_NO_MT) */ |
105 | | |
106 | | #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) |
107 | | #define _hb_memory_barrier() do {} while (0) |
108 | | #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) |
109 | | |
110 | | #endif |
111 | | |
112 | | |
113 | | /* This should never be disabled, even under HB_NO_MT. |
114 | | * except that MSVC gives me an internal compiler error, so disabled there. |
115 | | * |
116 | | * https://github.com/harfbuzz/harfbuzz/pull/4119 |
117 | | */ |
118 | | #ifndef _hb_compiler_memory_r_barrier |
119 | | #if defined(__ATOMIC_ACQUIRE) // gcc-like |
120 | 10.1M | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } Unexecuted instantiation: hb-blob.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-buffer.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-common.cc:_hb_compiler_memory_r_barrier() hb-face.cc:_hb_compiler_memory_r_barrier() Line | Count | Source | 120 | 3.15M | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } |
Unexecuted instantiation: hb-face-builder.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-fallback-shape.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-font.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-number.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-face.cc:_hb_compiler_memory_r_barrier() hb-ot-font.cc:_hb_compiler_memory_r_barrier() Line | Count | Source | 120 | 2.45k | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } |
Unexecuted instantiation: hb-outline.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-metrics.cc:_hb_compiler_memory_r_barrier() hb-ot-shape.cc:_hb_compiler_memory_r_barrier() Line | Count | Source | 120 | 15.7k | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } |
Unexecuted instantiation: hb-ot-var.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-set.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-shape-plan.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-shape.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-shaper.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-static.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-unicode.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ft.cc:_hb_compiler_memory_r_barrier() hb-aat-layout.cc:_hb_compiler_memory_r_barrier() Line | Count | Source | 120 | 6.50M | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } |
Unexecuted instantiation: hb-aat-map.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-buffer-verify.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-draw.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-paint.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-paint-bounded.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-paint-extents.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-cff1-table.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-cff2-table.cc:_hb_compiler_memory_r_barrier() hb-ot-layout.cc:_hb_compiler_memory_r_barrier() Line | Count | Source | 120 | 501k | static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } |
Unexecuted instantiation: hb-ot-map.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-arabic.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-default.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-hangul.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-hebrew.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-indic.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-khmer.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-myanmar.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-syllabic.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-thai.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-use.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shape-fallback.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shape-normalize.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-tag.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ucd.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-buffer-serialize.cc:_hb_compiler_memory_r_barrier() Unexecuted instantiation: hb-ot-shaper-indic-table.cc:_hb_compiler_memory_r_barrier() |
121 | | #elif !defined(_MSC_VER) |
122 | | #include <atomic> |
123 | | #define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire) |
124 | | #else |
125 | | static inline void _hb_compiler_memory_r_barrier () {} |
126 | | #endif |
127 | | #endif |
128 | | |
129 | | |
130 | | |
131 | | #ifndef _hb_memory_r_barrier |
132 | | #define _hb_memory_r_barrier() _hb_memory_barrier () |
133 | | #endif |
134 | | #ifndef _hb_memory_w_barrier |
135 | | #define _hb_memory_w_barrier() _hb_memory_barrier () |
136 | | #endif |
137 | | #ifndef hb_atomic_int_impl_set_relaxed |
138 | | #define hb_atomic_int_impl_set_relaxed(AI, V) (*(AI) = (V)) |
139 | | #endif |
140 | | #ifndef hb_atomic_int_impl_get_relaxed |
141 | | #define hb_atomic_int_impl_get_relaxed(AI) (*(AI)) |
142 | | #endif |
143 | | |
144 | | #ifndef hb_atomic_ptr_impl_set_relaxed |
145 | | #define hb_atomic_ptr_impl_set_relaxed(P, V) (*(P) = (V)) |
146 | | #endif |
147 | | #ifndef hb_atomic_ptr_impl_get_relaxed |
148 | | #define hb_atomic_ptr_impl_get_relaxed(P) (*(P)) |
149 | | #endif |
150 | | #ifndef hb_atomic_int_impl_set |
151 | | template <typename T> |
152 | | inline void hb_atomic_int_impl_set (T *AI, T v) { _hb_memory_w_barrier (); *AI = v; } |
153 | | #endif |
154 | | #ifndef hb_atomic_int_impl_get |
155 | | template <typename T> |
156 | | inline T hb_atomic_int_impl_get (const T *AI) { T v = *AI; _hb_memory_r_barrier (); return v; } |
157 | | #endif |
158 | | #ifndef hb_atomic_ptr_impl_get |
159 | | inline void *hb_atomic_ptr_impl_get (void ** const P) { void *v = *P; _hb_memory_r_barrier (); return v; } |
160 | | #endif |
161 | | |
162 | | |
163 | | template <typename T> |
164 | | struct hb_atomic_t |
165 | | { |
166 | 1.29M | hb_atomic_t () = default; hb_atomic_t<int>::hb_atomic_t() Line | Count | Source | 166 | 254k | hb_atomic_t () = default; |
hb_atomic_t<unsigned int>::hb_atomic_t() Line | Count | Source | 166 | 434k | hb_atomic_t () = default; |
hb_atomic_t<unsigned short>::hb_atomic_t() Line | Count | Source | 166 | 609k | hb_atomic_t () = default; |
|
167 | 254k | constexpr hb_atomic_t (T v) : v (v) {} hb_atomic_t<bool>::hb_atomic_t(bool) Line | Count | Source | 167 | 254k | constexpr hb_atomic_t (T v) : v (v) {} |
hb_atomic_t<unsigned int>::hb_atomic_t(unsigned int) Line | Count | Source | 167 | 312 | constexpr hb_atomic_t (T v) : v (v) {} |
|
168 | | |
169 | 1.49M | hb_atomic_t& operator = (T v_) { set_relaxed (v_); return *this; } hb_atomic_t<int>::operator=(int) Line | Count | Source | 169 | 508k | hb_atomic_t& operator = (T v_) { set_relaxed (v_); return *this; } |
hb_atomic_t<bool>::operator=(bool) Line | Count | Source | 169 | 279k | hb_atomic_t& operator = (T v_) { set_relaxed (v_); return *this; } |
hb_atomic_t<unsigned int>::operator=(unsigned int) Line | Count | Source | 169 | 63.0k | hb_atomic_t& operator = (T v_) { set_relaxed (v_); return *this; } |
hb_atomic_t<unsigned short>::operator=(unsigned short) Line | Count | Source | 169 | 647k | hb_atomic_t& operator = (T v_) { set_relaxed (v_); return *this; } |
|
170 | 18.3M | operator T () const { return get_relaxed (); } hb_atomic_t<int>::operator int() const Line | Count | Source | 170 | 10.6M | operator T () const { return get_relaxed (); } |
hb_atomic_t<bool>::operator bool() const Line | Count | Source | 170 | 2.22M | operator T () const { return get_relaxed (); } |
hb_atomic_t<unsigned int>::operator unsigned int() const Line | Count | Source | 170 | 3.46M | operator T () const { return get_relaxed (); } |
hb_atomic_t<unsigned short>::operator unsigned short() const Line | Count | Source | 170 | 2.00M | operator T () const { return get_relaxed (); } |
|
171 | | |
172 | 1.49M | void set_relaxed (T v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } hb_atomic_t<int>::set_relaxed(int) Line | Count | Source | 172 | 508k | void set_relaxed (T v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } |
hb_atomic_t<bool>::set_relaxed(bool) Line | Count | Source | 172 | 279k | void set_relaxed (T v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } |
hb_atomic_t<unsigned int>::set_relaxed(unsigned int) Line | Count | Source | 172 | 63.0k | void set_relaxed (T v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } |
hb_atomic_t<unsigned short>::set_relaxed(unsigned short) Line | Count | Source | 172 | 647k | void set_relaxed (T v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } |
|
173 | 0 | void set_release (T v_) { hb_atomic_int_impl_set (&v, v_); } Unexecuted instantiation: hb_atomic_t<int>::set_release(int) Unexecuted instantiation: hb_atomic_t<unsigned int>::set_release(unsigned int) |
174 | 18.3M | T get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } hb_atomic_t<int>::get_relaxed() const Line | Count | Source | 174 | 10.6M | T get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } |
hb_atomic_t<bool>::get_relaxed() const Line | Count | Source | 174 | 2.22M | T get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } |
hb_atomic_t<unsigned int>::get_relaxed() const Line | Count | Source | 174 | 3.46M | T get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } |
hb_atomic_t<unsigned short>::get_relaxed() const Line | Count | Source | 174 | 2.00M | T get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } |
|
175 | 0 | T get_acquire () const { return hb_atomic_int_impl_get (&v); } Unexecuted instantiation: hb_atomic_t<unsigned int>::get_acquire() const Unexecuted instantiation: hb_atomic_t<int>::get_acquire() const |
176 | 2.26M | T inc () { return hb_atomic_int_impl_add (&v, 1); } Line | Count | Source | 176 | 1.44M | T inc () { return hb_atomic_int_impl_add (&v, 1); } |
hb_atomic_t<unsigned int>::inc() Line | Count | Source | 176 | 819k | T inc () { return hb_atomic_int_impl_add (&v, 1); } |
|
177 | 1.69M | T dec () { return hb_atomic_int_impl_add (&v, -1); } |
178 | | |
179 | 819k | int operator ++ (int) { return inc (); } |
180 | | int operator -- (int) { return dec (); } |
181 | | long operator |= (long v_) { set_relaxed (get_relaxed () | v_); return *this; } |
182 | | |
183 | | T v = 0; |
184 | | }; |
185 | | |
186 | | template <typename T> |
187 | | struct hb_atomic_t<T*> |
188 | | { |
189 | 1.03M | hb_atomic_t () = default; hb_atomic_t<hb_user_data_array_t*>::hb_atomic_t() Line | Count | Source | 189 | 254k | hb_atomic_t () = default; |
hb_atomic_t<hb_ot_face_data_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<hb_fallback_face_data_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<hb_blob_t*>::hb_atomic_t() Line | Count | Source | 189 | 152k | hb_atomic_t () = default; |
hb_atomic_t<OT::cmap_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::hmtx_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::post_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::name_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::meta_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::vmtx_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::glyf_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::cff1_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::cff2_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::gvar_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::kern_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::GDEF_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::GSUB_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::GPOS_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<AAT::morx_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<AAT::mort_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<AAT::kerx_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::COLR_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::CBDT_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::sbix_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<OT::SVG_accelerator_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<hb_face_t::plan_node_t*>::hb_atomic_t() Line | Count | Source | 189 | 8.00k | hb_atomic_t () = default; |
hb_atomic_t<hb_ot_font_data_t*>::hb_atomic_t() Line | Count | Source | 189 | 209k | hb_atomic_t () = default; |
hb_atomic_t<hb_fallback_font_data_t*>::hb_atomic_t() Line | Count | Source | 189 | 209k | hb_atomic_t () = default; |
Unexecuted instantiation: hb_atomic_t<hb_glyf_scratch_t*>::hb_atomic_t() Unexecuted instantiation: hb_atomic_t<hb_vector_t<float, false>*>::hb_atomic_t() Unexecuted instantiation: hb_atomic_t<hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*>::hb_atomic_t() Unexecuted instantiation: hb_atomic_t<hb_colr_scratch_t*>::hb_atomic_t() Unexecuted instantiation: hb_atomic_t<unsigned short*>::hb_atomic_t() hb_atomic_t<hb_bit_set_t*>::hb_atomic_t() Line | Count | Source | 189 | 18.4k | hb_atomic_t () = default; |
|
190 | | constexpr hb_atomic_t (T* v) : v (v) {} |
191 | | hb_atomic_t (const hb_atomic_t &other) = delete; |
192 | | |
193 | 254k | void init (T* v_ = nullptr) { set_relaxed (v_); } |
194 | 2.65M | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } hb_atomic_t<hb_user_data_array_t*>::set_relaxed(hb_user_data_array_t*) Line | Count | Source | 194 | 254k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<hb_ot_font_data_t*>::set_relaxed(hb_ot_font_data_t*) Line | Count | Source | 194 | 1.02M | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<hb_fallback_font_data_t*>::set_relaxed(hb_fallback_font_data_t*) Line | Count | Source | 194 | 1.02M | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<hb_ot_face_data_t*>::set_relaxed(hb_ot_face_data_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<hb_fallback_face_data_t*>::set_relaxed(hb_fallback_face_data_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<hb_blob_t*>::set_relaxed(hb_blob_t*) Line | Count | Source | 194 | 152k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::cmap_accelerator_t*>::set_relaxed(OT::cmap_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::hmtx_accelerator_t*>::set_relaxed(OT::hmtx_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::post_accelerator_t*>::set_relaxed(OT::post_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::name_accelerator_t*>::set_relaxed(OT::name_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::meta_accelerator_t*>::set_relaxed(OT::meta_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::vmtx_accelerator_t*>::set_relaxed(OT::vmtx_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::glyf_accelerator_t*>::set_relaxed(OT::glyf_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::cff1_accelerator_t*>::set_relaxed(OT::cff1_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::cff2_accelerator_t*>::set_relaxed(OT::cff2_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::gvar_accelerator_t*>::set_relaxed(OT::gvar_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::kern_accelerator_t*>::set_relaxed(OT::kern_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::GDEF_accelerator_t*>::set_relaxed(OT::GDEF_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::GSUB_accelerator_t*>::set_relaxed(OT::GSUB_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::GPOS_accelerator_t*>::set_relaxed(OT::GPOS_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<AAT::morx_accelerator_t*>::set_relaxed(AAT::morx_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<AAT::mort_accelerator_t*>::set_relaxed(AAT::mort_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<AAT::kerx_accelerator_t*>::set_relaxed(AAT::kerx_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::COLR_accelerator_t*>::set_relaxed(OT::COLR_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::CBDT_accelerator_t*>::set_relaxed(OT::CBDT_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::sbix_accelerator_t*>::set_relaxed(OT::sbix_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
hb_atomic_t<OT::SVG_accelerator_t*>::set_relaxed(OT::SVG_accelerator_t*) Line | Count | Source | 194 | 8.00k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
Unexecuted instantiation: hb_atomic_t<hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*>::set_relaxed(hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*) hb_atomic_t<hb_bit_set_t*>::set_relaxed(hb_bit_set_t*) Line | Count | Source | 194 | 9.20k | void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } |
|
195 | 30.6k | T *get_relaxed () const { return (T *) hb_atomic_ptr_impl_get_relaxed (&v); } Unexecuted instantiation: hb_atomic_t<hb_glyf_scratch_t*>::get_relaxed() const Unexecuted instantiation: hb_atomic_t<hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*>::get_relaxed() const hb_atomic_t<hb_bit_set_t*>::get_relaxed() const Line | Count | Source | 195 | 23.0k | T *get_relaxed () const { return (T *) hb_atomic_ptr_impl_get_relaxed (&v); } |
hb_atomic_t<OT::hb_ot_layout_lookup_accelerator_t*>::get_relaxed() const Line | Count | Source | 195 | 7.66k | T *get_relaxed () const { return (T *) hb_atomic_ptr_impl_get_relaxed (&v); } |
Unexecuted instantiation: hb_atomic_t<hb_colr_scratch_t*>::get_relaxed() const Unexecuted instantiation: hb_atomic_t<hb_vector_t<CFF::code_pair_t, false>*>::get_relaxed() const Unexecuted instantiation: hb_atomic_t<OT::GPOS_accelerator_t*>::get_relaxed() const Unexecuted instantiation: hb_atomic_t<OT::GSUB_accelerator_t*>::get_relaxed() const |
196 | 7.05M | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } hb_atomic_t<hb_user_data_array_t*>::get_acquire() const Line | Count | Source | 196 | 254k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_ot_font_data_t*>::get_acquire() const Line | Count | Source | 196 | 1.63M | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_fallback_font_data_t*>::get_acquire() const Line | Count | Source | 196 | 1.02M | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_language_item_t*>::get_acquire() const Line | Count | Source | 196 | 154k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<__locale_struct*>::get_acquire() const hb_atomic_t<hb_language_impl_t const*>::get_acquire() const Line | Count | Source | 196 | 47.0k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<char const*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<char const**>::get_acquire() const hb_atomic_t<hb_face_t::plan_node_t*>::get_acquire() const Line | Count | Source | 196 | 209k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_ot_face_data_t*>::get_acquire() const Line | Count | Source | 196 | 211k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_fallback_face_data_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::cmap_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_blob_t*>::get_acquire() const Line | Count | Source | 196 | 181k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::hmtx_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<unsigned short*>::get_acquire() const hb_atomic_t<OT::post_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::name_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::meta_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::vmtx_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::glyf_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::cff1_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<hb_vector_t<float, false>*>::get_acquire() const hb_atomic_t<OT::cff2_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::gvar_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::kern_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 13.0k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::GDEF_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 1.63M | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::GSUB_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 431k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::GPOS_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 429k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<AAT::hb_aat_layout_chain_accelerator_t*>::get_acquire() const hb_atomic_t<AAT::morx_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 10.7k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<AAT::mort_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 10.7k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<AAT::kerx_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 10.7k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::COLR_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::CBDT_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::sbix_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::SVG_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<hb_glyf_scratch_t*>::get_acquire() const Unexecuted instantiation: hb_atomic_t<hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*>::get_acquire() const hb_atomic_t<hb_bit_set_t*>::get_acquire() const Line | Count | Source | 196 | 2.26k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::hb_ot_layout_lookup_accelerator_t*>::get_acquire() const Line | Count | Source | 196 | 11.7k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<hb_colr_scratch_t*>::get_acquire() const hb_atomic_t<hb_font_funcs_t*>::get_acquire() const Line | Count | Source | 196 | 8.00k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_cache_t<24u, 16u, 8u, true>*>::get_acquire() const Line | Count | Source | 196 | 16.0k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<OT::hb_scalar_cache_t*>::get_acquire() const Line | Count | Source | 196 | 24.0k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<hb_draw_funcs_t*>::get_acquire() const hb_atomic_t<hb_shaper_entry_t*>::get_acquire() const Line | Count | Source | 196 | 203k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
Unexecuted instantiation: hb_atomic_t<FT_LibraryRec_*>::get_acquire() const Unexecuted instantiation: hb_atomic_t<hb_paint_funcs_t*>::get_acquire() const hb_atomic_t<arabic_fallback_plan_t*>::get_acquire() const Line | Count | Source | 196 | 12 | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
hb_atomic_t<hb_unicode_funcs_t*>::get_acquire() const Line | Count | Source | 196 | 407k | T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } |
|
197 | 247k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } Unexecuted instantiation: hb_atomic_t<hb_user_data_array_t*>::cmpexch(hb_user_data_array_t const*, hb_user_data_array_t*) hb_atomic_t<hb_language_item_t*>::cmpexch(hb_language_item_t const*, hb_language_item_t*) Line | Count | Source | 197 | 23 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<__locale_struct*>::cmpexch(__locale_struct const*, __locale_struct*) hb_atomic_t<hb_language_impl_t const*>::cmpexch(hb_language_impl_t const*, hb_language_impl_t const*) Line | Count | Source | 197 | 1 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<char const*>::cmpexch(char const*, char const*) Line | Count | Source | 197 | 1 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<char const**>::cmpexch(char const* const*, char const**) hb_atomic_t<hb_blob_t*>::cmpexch(hb_blob_t const*, hb_blob_t*) Line | Count | Source | 197 | 20.6k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<OT::cmap_accelerator_t*>::cmpexch(OT::cmap_accelerator_t const*, OT::cmap_accelerator_t*) Unexecuted instantiation: hb_atomic_t<hb_vector_t<float, false>*>::cmpexch(hb_vector_t<float, false> const*, hb_vector_t<float, false>*) Unexecuted instantiation: hb_atomic_t<OT::hmtx_accelerator_t*>::cmpexch(OT::hmtx_accelerator_t const*, OT::hmtx_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::vmtx_accelerator_t*>::cmpexch(OT::vmtx_accelerator_t const*, OT::vmtx_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::gvar_accelerator_t*>::cmpexch(OT::gvar_accelerator_t const*, OT::gvar_accelerator_t*) Unexecuted instantiation: hb_atomic_t<hb_glyf_scratch_t*>::cmpexch(hb_glyf_scratch_t const*, hb_glyf_scratch_t*) Unexecuted instantiation: hb_atomic_t<hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*>::cmpexch(hb_vector_t<OT::cff1::accelerator_t::gname_t, true> const*, hb_vector_t<OT::cff1::accelerator_t::gname_t, true>*) hb_atomic_t<hb_bit_set_t*>::cmpexch(hb_bit_set_t const*, hb_bit_set_t*) Line | Count | Source | 197 | 4.49k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<OT::GDEF_accelerator_t*>::cmpexch(OT::GDEF_accelerator_t const*, OT::GDEF_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<OT::hb_ot_layout_lookup_accelerator_t*>::cmpexch(OT::hb_ot_layout_lookup_accelerator_t const*, OT::hb_ot_layout_lookup_accelerator_t*) Line | Count | Source | 197 | 220 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<unsigned short*>::cmpexch(unsigned short const*, unsigned short*) Unexecuted instantiation: hb_atomic_t<hb_colr_scratch_t*>::cmpexch(hb_colr_scratch_t const*, hb_colr_scratch_t*) Unexecuted instantiation: hb_atomic_t<hb_cache_t<24u, 16u, 8u, true>*>::cmpexch(hb_cache_t<24u, 16u, 8u, true> const*, hb_cache_t<24u, 16u, 8u, true>*) Unexecuted instantiation: hb_atomic_t<OT::hb_scalar_cache_t*>::cmpexch(OT::hb_scalar_cache_t const*, OT::hb_scalar_cache_t*) Unexecuted instantiation: hb_atomic_t<OT::glyf_accelerator_t*>::cmpexch(OT::glyf_accelerator_t const*, OT::glyf_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::cff2_accelerator_t*>::cmpexch(OT::cff2_accelerator_t const*, OT::cff2_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::cff1_accelerator_t*>::cmpexch(OT::cff1_accelerator_t const*, OT::cff1_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::COLR_accelerator_t*>::cmpexch(OT::COLR_accelerator_t const*, OT::COLR_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::SVG_accelerator_t*>::cmpexch(OT::SVG_accelerator_t const*, OT::SVG_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::CBDT_accelerator_t*>::cmpexch(OT::CBDT_accelerator_t const*, OT::CBDT_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::sbix_accelerator_t*>::cmpexch(OT::sbix_accelerator_t const*, OT::sbix_accelerator_t*) Unexecuted instantiation: hb_atomic_t<OT::post_accelerator_t*>::cmpexch(OT::post_accelerator_t const*, OT::post_accelerator_t*) hb_atomic_t<hb_font_funcs_t*>::cmpexch(hb_font_funcs_t const*, hb_font_funcs_t*) Line | Count | Source | 197 | 2 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<hb_draw_funcs_t*>::cmpexch(hb_draw_funcs_t const*, hb_draw_funcs_t*) hb_atomic_t<hb_ot_font_data_t*>::cmpexch(hb_ot_font_data_t const*, hb_ot_font_data_t*) Line | Count | Source | 197 | 201k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<hb_fallback_font_data_t*>::cmpexch(hb_fallback_font_data_t const*, hb_fallback_font_data_t*) hb_atomic_t<hb_ot_face_data_t*>::cmpexch(hb_ot_face_data_t const*, hb_ot_face_data_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<hb_fallback_face_data_t*>::cmpexch(hb_fallback_face_data_t const*, hb_fallback_face_data_t*) hb_atomic_t<hb_face_t::plan_node_t*>::cmpexch(hb_face_t::plan_node_t const*, hb_face_t::plan_node_t*) Line | Count | Source | 197 | 2.69k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<hb_shaper_entry_t*>::cmpexch(hb_shaper_entry_t const*, hb_shaper_entry_t*) Line | Count | Source | 197 | 1 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<FT_LibraryRec_*>::cmpexch(FT_LibraryRec_ const*, FT_LibraryRec_*) hb_atomic_t<OT::GSUB_accelerator_t*>::cmpexch(OT::GSUB_accelerator_t const*, OT::GSUB_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<AAT::morx_accelerator_t*>::cmpexch(AAT::morx_accelerator_t const*, AAT::morx_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<AAT::mort_accelerator_t*>::cmpexch(AAT::mort_accelerator_t const*, AAT::mort_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<AAT::hb_aat_layout_chain_accelerator_t*>::cmpexch(AAT::hb_aat_layout_chain_accelerator_t const*, AAT::hb_aat_layout_chain_accelerator_t*) hb_atomic_t<AAT::kerx_accelerator_t*>::cmpexch(AAT::kerx_accelerator_t const*, AAT::kerx_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
Unexecuted instantiation: hb_atomic_t<hb_paint_funcs_t*>::cmpexch(hb_paint_funcs_t const*, hb_paint_funcs_t*) hb_atomic_t<OT::GPOS_accelerator_t*>::cmpexch(OT::GPOS_accelerator_t const*, OT::GPOS_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<OT::kern_accelerator_t*>::cmpexch(OT::kern_accelerator_t const*, OT::kern_accelerator_t*) Line | Count | Source | 197 | 2.30k | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<arabic_fallback_plan_t*>::cmpexch(arabic_fallback_plan_t const*, arabic_fallback_plan_t*) Line | Count | Source | 197 | 2 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
hb_atomic_t<hb_unicode_funcs_t*>::cmpexch(hb_unicode_funcs_t const*, hb_unicode_funcs_t*) Line | Count | Source | 197 | 2 | bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } |
|
198 | | |
199 | 0 | operator bool () const { return get_acquire () != nullptr; } |
200 | 0 | T * operator -> () const { return get_acquire (); } |
201 | 410k | template <typename C> operator C * () const { return get_acquire (); } hb_atomic_t<hb_language_item_t*>::operator hb_language_item_t*<hb_language_item_t>() const Line | Count | Source | 201 | 154k | template <typename C> operator C * () const { return get_acquire (); } |
hb_atomic_t<hb_language_impl_t const*>::operator hb_language_impl_t const*<hb_language_impl_t const>() const Line | Count | Source | 201 | 47.0k | template <typename C> operator C * () const { return get_acquire (); } |
hb_atomic_t<hb_face_t::plan_node_t*>::operator hb_face_t::plan_node_t*<hb_face_t::plan_node_t>() const Line | Count | Source | 201 | 209k | template <typename C> operator C * () const { return get_acquire (); } |
Unexecuted instantiation: hb_atomic_t<AAT::hb_aat_layout_chain_accelerator_t*>::operator void*<void>() const hb_atomic_t<arabic_fallback_plan_t*>::operator arabic_fallback_plan_t*<arabic_fallback_plan_t>() const Line | Count | Source | 201 | 12 | template <typename C> operator C * () const { return get_acquire (); } |
|
202 | | |
203 | | T *v = nullptr; |
204 | | }; |
205 | | |
206 | | static inline bool hb_barrier () |
207 | 10.1M | { |
208 | 10.1M | _hb_compiler_memory_r_barrier (); |
209 | 10.1M | return true; |
210 | 10.1M | } Unexecuted instantiation: hb-blob.cc:hb_barrier() Unexecuted instantiation: hb-buffer.cc:hb_barrier() Unexecuted instantiation: hb-common.cc:hb_barrier() Line | Count | Source | 207 | 3.15M | { | 208 | 3.15M | _hb_compiler_memory_r_barrier (); | 209 | 3.15M | return true; | 210 | 3.15M | } |
Unexecuted instantiation: hb-face-builder.cc:hb_barrier() Unexecuted instantiation: hb-fallback-shape.cc:hb_barrier() Unexecuted instantiation: hb-font.cc:hb_barrier() Unexecuted instantiation: hb-number.cc:hb_barrier() Unexecuted instantiation: hb-ot-face.cc:hb_barrier() hb-ot-font.cc:hb_barrier() Line | Count | Source | 207 | 2.45k | { | 208 | 2.45k | _hb_compiler_memory_r_barrier (); | 209 | 2.45k | return true; | 210 | 2.45k | } |
Unexecuted instantiation: hb-outline.cc:hb_barrier() Unexecuted instantiation: hb-ot-metrics.cc:hb_barrier() hb-ot-shape.cc:hb_barrier() Line | Count | Source | 207 | 15.7k | { | 208 | 15.7k | _hb_compiler_memory_r_barrier (); | 209 | 15.7k | return true; | 210 | 15.7k | } |
Unexecuted instantiation: hb-ot-var.cc:hb_barrier() Unexecuted instantiation: hb-set.cc:hb_barrier() Unexecuted instantiation: hb-shape-plan.cc:hb_barrier() Unexecuted instantiation: hb-shape.cc:hb_barrier() Unexecuted instantiation: hb-shaper.cc:hb_barrier() Unexecuted instantiation: hb-static.cc:hb_barrier() Unexecuted instantiation: hb-unicode.cc:hb_barrier() Unexecuted instantiation: hb-ft.cc:hb_barrier() hb-aat-layout.cc:hb_barrier() Line | Count | Source | 207 | 6.50M | { | 208 | 6.50M | _hb_compiler_memory_r_barrier (); | 209 | 6.50M | return true; | 210 | 6.50M | } |
Unexecuted instantiation: hb-aat-map.cc:hb_barrier() Unexecuted instantiation: hb-buffer-verify.cc:hb_barrier() Unexecuted instantiation: hb-draw.cc:hb_barrier() Unexecuted instantiation: hb-paint.cc:hb_barrier() Unexecuted instantiation: hb-paint-bounded.cc:hb_barrier() Unexecuted instantiation: hb-paint-extents.cc:hb_barrier() Unexecuted instantiation: hb-ot-cff1-table.cc:hb_barrier() Unexecuted instantiation: hb-ot-cff2-table.cc:hb_barrier() hb-ot-layout.cc:hb_barrier() Line | Count | Source | 207 | 501k | { | 208 | 501k | _hb_compiler_memory_r_barrier (); | 209 | 501k | return true; | 210 | 501k | } |
Unexecuted instantiation: hb-ot-map.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-arabic.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-default.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-hangul.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-hebrew.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-indic.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-khmer.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-myanmar.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-syllabic.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-thai.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-use.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:hb_barrier() Unexecuted instantiation: hb-ot-shape-fallback.cc:hb_barrier() Unexecuted instantiation: hb-ot-shape-normalize.cc:hb_barrier() Unexecuted instantiation: hb-ot-tag.cc:hb_barrier() Unexecuted instantiation: hb-ucd.cc:hb_barrier() Unexecuted instantiation: hb-buffer-serialize.cc:hb_barrier() Unexecuted instantiation: hb-ot-shaper-indic-table.cc:hb_barrier() |
211 | | |
212 | | |
213 | | #endif /* HB_ATOMIC_HH */ |