equal
deleted
inserted
replaced
42 |
42 |
43 #ifdef HB_USE_ATEXIT |
43 #ifdef HB_USE_ATEXIT |
44 static |
44 static |
45 void free_static_shapers (void) |
45 void free_static_shapers (void) |
46 { |
46 { |
47 if (unlikely (static_shapers != all_shapers)) |
47 retry: |
48 free ((void *) static_shapers); |
48 hb_shaper_pair_t *shapers = (hb_shaper_pair_t *) hb_atomic_ptr_get (&static_shapers); |
|
49 if (!hb_atomic_ptr_cmpexch (&static_shapers, shapers, nullptr)) |
|
50 goto retry; |
|
51 |
|
52 if (unlikely (shapers != all_shapers)) |
|
53 free ((void *) shapers); |
49 } |
54 } |
50 #endif |
55 #endif |
51 |
56 |
52 const hb_shaper_pair_t * |
57 const hb_shaper_pair_t * |
53 _hb_shapers_get (void) |
58 _hb_shapers_get (void) |