diff --git a/src/OT/Color/COLR/COLR.hh b/src/OT/Color/COLR/COLR.hh index ac9a881c8..4d0bf480e 100644 --- a/src/OT/Color/COLR/COLR.hh +++ b/src/OT/Color/COLR/COLR.hh @@ -2230,7 +2230,7 @@ struct COLR public: hb_blob_ptr_t colr; private: - hb_atomic_ptr_t cached_scratch; + hb_atomic_t cached_scratch; }; void closure_glyphs (hb_codepoint_t glyph, diff --git a/src/OT/Var/VARC/VARC.hh b/src/OT/Var/VARC/VARC.hh index ca9a59fd9..22cfbb8ca 100644 --- a/src/OT/Var/VARC/VARC.hh +++ b/src/OT/Var/VARC/VARC.hh @@ -235,7 +235,7 @@ struct VARC private: hb_blob_ptr_t table; - hb_atomic_ptr_t cached_scratch; + hb_atomic_t cached_scratch; }; bool has_data () const { return version.major != 0; } diff --git a/src/OT/glyf/glyf.hh b/src/OT/glyf/glyf.hh index c1847b275..b136b1502 100644 --- a/src/OT/glyf/glyf.hh +++ b/src/OT/glyf/glyf.hh @@ -543,7 +543,7 @@ struct glyf_accelerator_t unsigned int num_glyphs; hb_blob_ptr_t loca_table; hb_blob_ptr_t glyf_table; - hb_atomic_ptr_t cached_scratch; + hb_atomic_t cached_scratch; }; diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index ecde9e6e5..668d736fc 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1350,7 +1350,7 @@ struct mortmorx this->chain_count = table->get_chain_count (); - this->accels = (hb_atomic_ptr_t *) hb_calloc (this->chain_count, sizeof (*accels)); + this->accels = (hb_atomic_t *) hb_calloc (this->chain_count, sizeof (*accels)); if (unlikely (!this->accels)) { this->chain_count = 0; @@ -1397,7 +1397,7 @@ struct mortmorx hb_blob_ptr_t table; unsigned int chain_count; - hb_atomic_ptr_t *accels; + hb_atomic_t *accels; }; diff --git a/src/hb-atomic.hh b/src/hb-atomic.hh index 32c7c713a..e92ccbca1 100644 --- a/src/hb-atomic.hh +++ b/src/hb-atomic.hh @@ -203,8 +203,6 @@ struct hb_atomic_t T *v = nullptr; }; -template -using hb_atomic_ptr_t = hb_atomic_t; static inline bool hb_barrier () { diff --git a/src/hb-common.cc b/src/hb-common.cc index 55c227995..cae073b61 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -273,7 +273,7 @@ struct hb_language_item_t { /* Thread-safe lockfree language list */ -static hb_atomic_ptr_t langs; +static hb_atomic_t langs; static inline void free_langs () @@ -403,7 +403,7 @@ hb_language_to_string (hb_language_t language) hb_language_t hb_language_get_default () { - static hb_atomic_ptr_t default_language; + static hb_atomic_t default_language; hb_language_t language = default_language; if (unlikely (language == HB_LANGUAGE_INVALID)) diff --git a/src/hb-face.cc b/src/hb-face.cc index 0399e720e..4f06ebf20 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -356,7 +356,7 @@ static struct supported_face_loaders_t { static const char *get_default_loader_name () { - static hb_atomic_ptr_t static_loader_name; + static hb_atomic_t static_loader_name; const char *loader_name = static_loader_name.get_acquire (); if (!loader_name) { diff --git a/src/hb-face.hh b/src/hb-face.hh index 908ec6593..77c243721 100644 --- a/src/hb-face.hh +++ b/src/hb-face.hh @@ -70,7 +70,7 @@ struct hb_face_t plan_node_t *next; }; #ifndef HB_NO_SHAPER - hb_atomic_ptr_t shape_plans; + hb_atomic_t shape_plans; #endif hb_blob_t *reference_table (hb_tag_t tag) const diff --git a/src/hb-font.cc b/src/hb-font.cc index 28d9ff2f5..a951724a0 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -2323,7 +2323,7 @@ static struct supported_font_funcs_t { static const char *get_default_funcs_name () { - static hb_atomic_ptr_t static_funcs_name; + static hb_atomic_t static_funcs_name; const char *name = static_funcs_name.get_acquire (); if (!name) { diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index 7ea038622..c547134d5 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -68,7 +68,7 @@ struct hb_graphite2_face_data_t { hb_face_t *face; gr_face *grface; - hb_atomic_ptr_t tlist; + hb_atomic_t tlist; }; static const void *hb_graphite2_get_table (const void *data, unsigned int tag, size_t *len) diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index c3e301812..6127c4d0c 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -273,7 +273,7 @@ struct hb_lazy_loader_t : hb_data_wrapper_t private: /* Must only have one pointer. */ - hb_atomic_ptr_t instance; + hb_atomic_t instance; }; /* Specializations. */ diff --git a/src/hb-object.hh b/src/hb-object.hh index d48c47aed..7b34d671f 100644 --- a/src/hb-object.hh +++ b/src/hb-object.hh @@ -214,7 +214,7 @@ struct hb_object_header_t { hb_reference_count_t ref_count; mutable hb_atomic_t writable = false; - hb_atomic_ptr_t user_data; + hb_atomic_t user_data; bool is_inert () const { return !ref_count.get_relaxed (); } }; diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 666efeb92..f51e33173 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -1483,7 +1483,7 @@ struct cff1 int cmp (const gname_t &a) const { return cmp (&a, this); } }; - mutable hb_atomic_ptr_t> glyph_names; + mutable hb_atomic_t *> glyph_names; typedef accelerator_templ_t SUPER; }; diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index d41cdd51a..9bd0db4b8 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -86,7 +86,7 @@ struct hb_ot_font_t /* h_advance caching */ mutable hb_atomic_t cached_coords_serial; - mutable hb_atomic_ptr_t advance_cache; + mutable hb_atomic_t advance_cache; }; static hb_ot_font_t * diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 183e08ccc..7d49710d1 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -4900,7 +4900,7 @@ struct GSUBGPOS this->lookup_count = table->get_lookup_count (); - this->accels = (hb_atomic_ptr_t *) hb_calloc (this->lookup_count, sizeof (*accels)); + this->accels = (hb_atomic_t *) hb_calloc (this->lookup_count, sizeof (*accels)); if (unlikely (!this->accels)) { this->lookup_count = 0; @@ -4948,7 +4948,7 @@ struct GSUBGPOS hb_blob_ptr_t table; unsigned int lookup_count; - hb_atomic_ptr_t *accels; + hb_atomic_t *accels; }; protected: diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index bb45bd8c6..c8a58bdf8 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -290,7 +290,7 @@ struct post const Array16Of *glyphNameIndex = nullptr; hb_vector_t index_to_offset; const uint8_t *pool = nullptr; - hb_atomic_ptr_t gids_sorted_by_name; + hb_atomic_t gids_sorted_by_name; }; bool has_data () const { return version.to_int (); } diff --git a/src/hb-ot-shaper-arabic.cc b/src/hb-ot-shaper-arabic.cc index 4e3b512b4..44b670fcc 100644 --- a/src/hb-ot-shaper-arabic.cc +++ b/src/hb-ot-shaper-arabic.cc @@ -260,7 +260,7 @@ struct arabic_shape_plan_t * mask_array[NONE] == 0. */ hb_mask_t mask_array[ARABIC_NUM_FEATURES + 1]; - hb_atomic_ptr_t fallback_plan; + hb_atomic_t fallback_plan; unsigned int do_fallback : 1; unsigned int has_stch : 1; diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index c3f7b40c8..c6532ad5e 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -570,7 +570,7 @@ struct cff_subset_accelerator_t parsed_cs_str_vec_t parsed_charstrings; parsed_cs_str_vec_t parsed_global_subrs; hb_vector_t parsed_local_subrs; - mutable hb_atomic_ptr_t glyph_to_sid_map; + mutable hb_atomic_t glyph_to_sid_map; private: hb_blob_t* original_blob; diff --git a/src/hb-wasm-shape.cc b/src/hb-wasm-shape.cc index a8b91879a..f83329e1c 100644 --- a/src/hb-wasm-shape.cc +++ b/src/hb-wasm-shape.cc @@ -113,7 +113,7 @@ struct hb_wasm_shape_plan_t { struct hb_wasm_face_data_t { hb_blob_t *wasm_blob; wasm_module_t wasm_module; - mutable hb_atomic_ptr_t plan; + mutable hb_atomic_t plan; }; static bool