Searched defs:hb_reference_count_t (Results 1 – 1 of 1) sorted by relevance
144 struct hb_reference_count_t struct146 mutable hb_atomic_int_t ref_count;148 void init (int v = 1) { ref_count.set_relaxed (v); } in init()149 int get_relaxed () const { return ref_count.get_relaxed (); } in get_relaxed()150 int inc () const { return ref_count.inc (); } in inc()151 int dec () const { return ref_count.dec (); } in dec()152 void fini () { ref_count.set_relaxed (HB_REFERENCE_COUNT_POISON_VALUE); } in fini()154 bool is_inert () const { return ref_count.get_relaxed () == HB_REFERENCE_COUNT_INERT_VALUE; } in is_inert()155 bool is_valid () const { return ref_count.get_relaxed () > 0; } in is_valid()