Home
last modified time | relevance | path

Searched refs:refcount (Results 1 – 25 of 142) sorted by relevance

123456

/dflybsd-src/sys/dev/drm/include/linux/
H A Dkref.h37 refcount_t refcount; member
43 atomic_set(&kref->refcount.refs, 1); in kref_init()
49 return atomic_read(&kref->refcount.refs); in kref_read()
55 refcount_inc(&kref->refcount); in kref_get()
61 if (atomic_dec_and_test(&kref->refcount.refs)) { in kref_put()
74 if (refcount_release_n(&kref->refcount.counter, count)) {
87 return atomic_add_unless(&kref->refcount.refs, 1, 0); in kref_get_unless_zero()
94 if (!atomic_add_unless(&kref->refcount.refs, -1, 1)) { in kref_put_mutex()
96 if (likely(atomic_dec_and_test(&kref->refcount.refs))) { in kref_put_mutex()
H A Ddma-fence.h42 struct kref refcount; member
93 kref_get(&fence->refcount); in dma_fence_get()
101 kref_get(&fence->refcount); in dma_fence_get_rcu()
109 kref_put(&fence->refcount, dma_fence_release); in dma_fence_put()
181 kref_get(&fence->refcount); in dma_fence_get_rcu_safe()
/dflybsd-src/contrib/binutils-2.27/bfd/
H A Delf-strtab.c36 unsigned int refcount; member
85 ret->refcount = 0; in elf_strtab_hash_newfunc()
160 entry->refcount++; in _bfd_elf_strtab_add()
189 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
199 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
200 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
206 return tab->array[idx]->refcount; in _bfd_elf_strtab_refcount()
215 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
223 unsigned int refcount[1]; member
232 size = sizeof (*save) + (tab->size - 1) * sizeof (save->refcount[0]); in _bfd_elf_strtab_save()
[all …]
H A Delf-ifunc.c126 bfd_boolean use_plt = !avoid_plt || h->plt.refcount > 0; in _bfd_elf_allocate_ifunc_dyn_relocs()
178 if (h->plt.refcount <= 0 && h->got.refcount <= 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
190 if (h->plt.refcount > 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
191 || h->got.refcount > 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
307 && (h->got.refcount <= 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
326 if (h->got.refcount <= 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
/dflybsd-src/contrib/binutils-2.34/bfd/
H A Delf-strtab.c36 unsigned int refcount; member
85 ret->refcount = 0; in elf_strtab_hash_newfunc()
160 entry->refcount++; in _bfd_elf_strtab_add()
189 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
199 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
200 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
206 return tab->array[idx]->refcount; in _bfd_elf_strtab_refcount()
215 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
223 unsigned int refcount[1]; member
232 size = sizeof (*save) + (tab->size - 1) * sizeof (save->refcount[0]); in _bfd_elf_strtab_save()
[all …]
H A Delf-ifunc.c123 bfd_boolean use_plt = !avoid_plt || h->plt.refcount > 0; in _bfd_elf_allocate_ifunc_dyn_relocs()
183 if (h->plt.refcount <= 0 && h->got.refcount <= 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
195 if (h->plt.refcount > 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
196 || h->got.refcount > 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
312 && (h->got.refcount <= 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
331 if (h->got.refcount <= 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
/dflybsd-src/sys/dev/drm/amd/display/dc/core/
H A Ddc_surface.c81 kref_init(&plane_state->refcount); in dc_create_plane_state()
133 kref_get(&plane_state->refcount); in dc_plane_state_retain()
138 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free()
145 kref_put(&plane_state->refcount, dc_plane_state_free); in dc_plane_state_release()
150 kref_get(&gamma->refcount); in dc_gamma_retain()
155 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free()
161 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release()
172 kref_init(&gamma->refcount); in dc_create_gamma()
181 kref_get(&tf->refcount); in dc_transfer_func_retain()
186 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free()
[all …]
H A Ddc_sink.c70 kref_get(&sink->refcount); in dc_sink_retain()
75 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free()
82 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release()
95 kref_init(&sink->refcount); in dc_sink_create()
/dflybsd-src/contrib/gdb-7/bfd/
H A Delf-strtab.c37 unsigned int refcount; member
86 ret->refcount = 0; in elf_strtab_hash_newfunc()
161 entry->refcount++; in _bfd_elf_strtab_add()
190 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
200 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
201 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
207 return tab->array[idx]->refcount; in _bfd_elf_strtab_refcount()
216 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
234 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_restore_size()
255 BFD_ASSERT (entry->refcount > 0); in _bfd_elf_strtab_offset()
[all …]
H A Delf-ifunc.c191 if (h->plt.refcount <= 0 && h->got.refcount <= 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
217 if (h->plt.refcount > 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
218 || h->got.refcount > 0) in _bfd_elf_allocate_ifunc_dyn_relocs()
302 if (h->got.refcount <= 0 in _bfd_elf_allocate_ifunc_dyn_relocs()
/dflybsd-src/crypto/openssh/
H A Dsshbuf.c50 u_int refcount; /* Tracks self and number of child buffers */ member
60 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity()
80 if (buf->off == 0 || buf->readonly || buf->refcount > 1) in sshbuf_maybe_pack()
101 ret->refcount = 1; in sshbuf_new()
120 ret->refcount = 1; in sshbuf_from()
138 child->parent->refcount++; in sshbuf_set_parent()
177 buf->refcount--; in sshbuf_free()
178 if (buf->refcount > 0) in sshbuf_free()
200 if (buf->readonly || buf->refcount > 1) { in sshbuf_reset()
239 return buf->refcount; in sshbuf_refcount()
[all …]
/dflybsd-src/sys/dev/drm/
H A Ddrm_global.c40 int refcount; member
53 item->refcount = 0; in drm_global_init()
63 BUG_ON(item->refcount != 0); in drm_global_release()
85 if (item->refcount == 0) { in drm_global_item_ref()
100 ++item->refcount; in drm_global_item_ref()
129 BUG_ON(item->refcount == 0); in drm_global_item_unref()
131 if (--item->refcount == 0) { in drm_global_item_unref()
H A Ddrm_dp_aux_dev.c46 struct kref refcount; member
64 if (!kref_get_unless_zero(&aux_dev->refcount))
81 kref_init(&aux_dev->refcount);
99 container_of(ref, struct drm_dp_aux_dev, refcount);
115 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev);
231 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev);
290 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev);
H A Ddrm_mode_object.c51 kref_init(&obj->refcount); in __drm_mode_object_add()
146 if (!kref_get_unless_zero(&obj->refcount)) in __drm_mode_object_find()
187 DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); in drm_mode_object_put()
188 kref_put(&obj->refcount, obj->free_cb); in drm_mode_object_put()
204 DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); in drm_mode_object_get()
205 kref_get(&obj->refcount); in drm_mode_object_get()
/dflybsd-src/sbin/udevd/
H A Dtest_udevd.c78 int refcount; in udev_unref() local
80 refcount = atomic_fetchadd_int(&udev_ctx->refs, -1); in udev_unref()
82 if (refcount == 1) { in udev_unref()
150 int refcount; in udev_enumerate_unref() local
152 refcount = atomic_fetchadd_int(&udev_enum->refs, -1); in udev_enumerate_unref()
154 if (refcount == 1) { in udev_enumerate_unref()
293 int refcount; in udev_monitor_unref() local
295 refcount = atomic_fetchadd_int(&udev_monitor->refs, -1); in udev_monitor_unref()
297 if (refcount == 1) { in udev_monitor_unref()
549 int refcount; in udev_device_unref() local
[all …]
/dflybsd-src/sys/dev/drm/ttm/
H A Dttm_object.c75 struct kref refcount; member
136 kref_get(&tfile->refcount); in ttm_object_file_ref()
143 container_of(kref, struct ttm_object_file, refcount); in ttm_object_file_destroy()
154 kref_put(&tfile->refcount, ttm_object_file_destroy); in ttm_object_file_unref()
174 kref_init(&base->refcount); in ttm_base_object_init()
202 container_of(kref, struct ttm_base_object, refcount); in ttm_release_base()
226 kref_put(&base->refcount, ttm_release_base); in ttm_base_object_unref()
243 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup()
265 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup_for_ref()
378 kref_get(&base->refcount); in ttm_ref_object_add()
[all …]
/dflybsd-src/contrib/gcc-8.0/libgomp/
H A Dtarget.c349 if (oldn->refcount != REFCOUNT_INFINITY) in gomp_map_vars_existing()
350 oldn->refcount++; in gomp_map_vars_existing()
494 tgt->refcount = pragma_kind == GOMP_MAP_VARS_ENTER_DATA ? 0 : 1; in gomp_map_vars()
641 if (n && n->refcount != REFCOUNT_LINK) in gomp_map_vars()
827 if (n && n->refcount != REFCOUNT_LINK) in gomp_map_vars()
833 if (n && n->refcount == REFCOUNT_LINK) in gomp_map_vars()
861 k->refcount = 1; in gomp_map_vars()
862 tgt->refcount++; in gomp_map_vars()
911 if (k->refcount != REFCOUNT_INFINITY) in gomp_map_vars()
912 k->refcount++; in gomp_map_vars()
[all …]
/dflybsd-src/lib/libc/db/mpool/
H A Dmpool.libtp133 bhp->refcount = 0;
149 buf_fids[i].refcount = 0;
333 bhp->refcount++;
336 buf_table + (bhp-bufhdr_table), bhp->refcount);
393 int close; /* should we dec refcount and possibly
407 invalidate = (buf_fids[fid].refcount == 1 && close);
418 buf_fids[fid].refcount--;
465 bhp->refcount++;
472 bhp->refcount--;
473 if ( bhp->refcount ) {
[all …]
/dflybsd-src/sys/dev/drm/include/drm/
H A Ddrm_syncobj.h44 struct kref refcount; member
106 kref_get(&obj->refcount); in drm_syncobj_get()
116 kref_put(&obj->refcount, drm_syncobj_free); in drm_syncobj_put()
/dflybsd-src/lib/libc/nls/
H A Dmsgcat.c84 np->refcount = 0; \
105 int refcount; member
160 np->refcount++; in __catopen_l()
363 np->refcount--; in catclose()
364 if (np->refcount == 0) in catclose()
395 np->refcount++; in load_msgcat()
456 np->refcount = 1; in load_msgcat()
/dflybsd-src/sys/dev/drm/amd/amdgpu/
H A Damdgpu_ctx.c65 kref_init(&ctx->refcount); in amdgpu_ctx_init()
117 struct amdgpu_ctx *ctx = container_of(ref, struct amdgpu_ctx, refcount); in amdgpu_ctx_fini()
175 ctx = container_of(ref, struct amdgpu_ctx, refcount); in amdgpu_ctx_do_release()
196 kref_put(&ctx->refcount, amdgpu_ctx_do_release); in amdgpu_ctx_free()
325 kref_get(&ctx->refcount); in amdgpu_ctx_get()
335 kref_put(&ctx->refcount, amdgpu_ctx_do_release); in amdgpu_ctx_put()
494 if (kref_read(&ctx->refcount) == 1) in amdgpu_ctx_mgr_entity_fini()
513 if (kref_put(&ctx->refcount, amdgpu_ctx_fini) != 1) in amdgpu_ctx_mgr_fini()
H A Damdgpu_bo_list.c49 refcount); in amdgpu_bo_list_free()
80 kref_init(&list->refcount); in amdgpu_bo_list_create()
156 kref_put(&list->refcount, amdgpu_bo_list_free); in amdgpu_bo_list_destroy()
165 if (*result && kref_get_unless_zero(&(*result)->refcount)) { in amdgpu_bo_list_get()
209 kref_put(&list->refcount, amdgpu_bo_list_free); in amdgpu_bo_list_put()
/dflybsd-src/sys/bus/cam/
H A Dcam_sim.c199 sim->refcount = 1; in cam_sim_alloc()
247 if (sim->refcount == 1) { in cam_sim_release()
252 sim->refcount = 0; in cam_sim_release()
255 --sim->refcount; in cam_sim_release()
/dflybsd-src/sys/bus/firewire/
H A Dfwmem.c77 int refcount; member
270 fms->refcount ++; in fwmem_open()
277 fms->refcount = 1; in fwmem_open()
280 kprintf("%s: refcount=%d\n", __func__, fms->refcount); in fwmem_open()
292 fms->refcount --; in fwmem_close()
294 kprintf("%s: refcount=%d\n", __func__, fms->refcount); in fwmem_close()
295 if (fms->refcount < 1) { in fwmem_close()
/dflybsd-src/sys/dev/sound/
H A Dclone.c83 int refcount; member
178 c->refcount = 0; in snd_clone_create()
552 SND_CLONE_ASSERT(c->refcount >= 0, ("refcount < 0")); in snd_clone_ref()
554 return (++c->refcount); in snd_clone_ref()
571 SND_CLONE_ASSERT(c->refcount > 0, ("refcount <= 0")); in snd_clone_unref()
573 c->refcount--; in snd_clone_unref()
580 (c->refcount == 0 && (c->flags & SND_CLONE_GC_LASTREF)))) in snd_clone_unref()
583 return (c->refcount); in snd_clone_unref()

123456