Lines Matching refs:item
52 struct drm_global_item *item = &glob[i];
53 sx_init(&item->mutex, "drmgi");
54 item->object = NULL;
55 item->refcount = 0;
63 struct drm_global_item *item = &glob[i];
64 MPASS(item->object == NULL);
65 MPASS(item->refcount == 0);
66 sx_destroy(&item->mutex);
73 struct drm_global_item *item = &glob[ref->global_type];
76 sx_xlock(&item->mutex);
77 if (item->refcount == 0) {
78 item->object = malloc(ref->size, M_DRM_GLOBAL,
81 ref->object = item->object;
87 ++item->refcount;
88 ref->object = item->object;
89 object = item->object;
90 sx_xunlock(&item->mutex);
93 sx_xunlock(&item->mutex);
94 item->object = NULL;
100 struct drm_global_item *item = &glob[ref->global_type];
102 sx_xlock(&item->mutex);
103 MPASS(item->refcount != 0);
104 MPASS(ref->object == item->object);
105 if (--item->refcount == 0) {
107 free(item->object, M_DRM_GLOBAL);
108 item->object = NULL;
110 sx_xunlock(&item->mutex);