- bool has_ref = false;
-
- /* Confirm that the trace refcount has not reached 0. */
- pthread_mutex_lock(&trace->reflock);
- if (trace->ref.refcount != 0) {
- has_ref = true;
- urcu_ref_get(&trace->ref);
- }
- pthread_mutex_unlock(&trace->reflock);
-
- return has_ref;