1549N/A typedef struct _drm_intel_bufmgr_gem {
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A- atomic_inc(&bo_gem->refcount);
1089N/A- atomic_set(&bo_gem->refcount, 1);
1089N/A bo_gem->validate_index = -1;
1089N/A bo_gem->reloc_tree_fences = 0;
1549N/A bo_gem->used_as_reloc_target = false;
1549N/A DRMINITLISTHEAD(&bo_gem->vma_list);
1549N/A- atomic_set(&bo_gem->refcount, 1);
1549N/A bo_gem->validate_index = -1;
1549N/A bo_gem->reloc_tree_fences = 0;
1549N/A bo_gem->used_as_reloc_target = false;
1089N/A- atomic_set(&bo_gem->refcount, 1);
1089N/A bo_gem->validate_index = -1;
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A- assert(atomic_read(&bo_gem->refcount) > 0);
1089N/A- if (atomic_dec_and_test(&bo_gem->refcount))
1089N/A+ assert(bo_gem->refcount > 0);
1089N/A+ if (--bo_gem->refcount == 0)
1089N/A drm_intel_gem_bo_unreference_final(bo, time);
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A- assert(atomic_read(&bo_gem->refcount) > 0);
1089N/A+ assert(bo_gem->refcount > 0);
1549N/A if (atomic_add_unless(&bo_gem->refcount, -1, 1)) {
1089N/A drm_intel_bufmgr_gem *bufmgr_gem =
1549N/A pthread_mutex_lock(&bufmgr_gem->lock);
1549N/A- if (atomic_dec_and_test(&bo_gem->refcount)) {
1549N/A+ if (--bo_gem->refcount == 0) {
1333N/A bo_gem->gem_handle = handle;
1333N/A- atomic_set(&bo_gem->refcount, 1);
1333N/A bo_gem->validate_index = -1;
1549N/A DRMLISTFOREACHENTRY(bufmgr_gem, &bufmgr_list, managers) {
1549N/A if (bufmgr_gem->fd == fd) {
1549N/A- atomic_inc(&bufmgr_gem->refcount);
1549N/A if (atomic_add_unless(&bufmgr_gem->refcount, -1, 1)) {
1549N/A pthread_mutex_lock(&bufmgr_list_mutex);
1549N/A- if (atomic_dec_and_test(&bufmgr_gem->refcount)) {
1549N/A+ if (--bufmgr_gem->refcount == 0) {
1549N/A DRMLISTDEL(&bufmgr_gem->managers);
1549N/A drm_intel_bufmgr_gem_destroy(bufmgr);
1549N/A- atomic_set(&bufmgr_gem->refcount, 1);
1549N/A if (pthread_mutex_init(&bufmgr_gem->lock, NULL) != 0) {