_glthread_Mutex mutex;
int refCount;
drmMMListHead *heads;
+ int num_fences;
};
struct _DriFenceObject {
_glthread_LOCK_MUTEX(tmp->mutex);
tmp->refCount = 1;
tmp->info = *info;
+ tmp->num_fences = 0;
tmp->heads = calloc(tmp->info.num_classes, sizeof(*tmp->heads));
if (!tmp->heads)
goto out_err;
DRMLISTDELINIT(&fence->head);
if (fence->private)
mgr->info.unreference(mgr, &fence->private);
+ --mgr->num_fences;
fence->mgr = NULL;
--mgr->refCount;
free(fence);
+
}
}
DRMLISTADDTAIL(&fence->head, &mgr->heads[fence_class]);
fence->mgr = mgr;
++mgr->refCount;
+ ++mgr->num_fences;
_glthread_UNLOCK_MUTEX(mgr->mutex);
fence->fence_class = fence_class;
fence->fence_type = fence_type;