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,
80 if (unlikely(item->object == NULL)) {
85 ref->object = item->object;
91 ++item->refcount;
92 ref->object = item->object;
93 object = item->object;
94 sx_xunlock(&item->mutex);
97 sx_xunlock(&item->mutex);
98 item->object = NULL;
105 struct drm_global_item *item = &glob[ref->global_type];
107 sx_xlock(&item->mutex);
108 MPASS(item->refcount != 0);
109 MPASS(ref->object == item->object);
110 if (--item->refcount == 0) {
112 free(item->object, M_DRM_GLOBAL);
113 item->object = NULL;
115 sx_xunlock(&item->mutex);