Home
last modified time | relevance | path

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

12345678

/openbsd-src/sys/dev/pci/drm/include/linux/
H A Dkref.h27 uint32_t refcount; member
33 atomic_set(&ref->refcount, 1); in kref_init()
39 return atomic_read(&ref->refcount); in kref_read()
45 atomic_inc_int(&ref->refcount); in kref_get()
51 if (ref->refcount != 0) { in kref_get_unless_zero()
52 atomic_inc_int(&ref->refcount); in kref_get_unless_zero()
62 if (atomic_dec_int_nv(&ref->refcount) == 0) { in kref_put()
73 if (!atomic_add_unless(&kref->refcount, -1, 1)) { in kref_put_mutex()
75 if (likely(atomic_dec_and_test(&kref->refcount))) { in kref_put_mutex()
90 if (!atomic_add_unless(&kref->refcount, -1, 1)) { in kref_put_lock()
[all …]
/openbsd-src/sys/dev/pci/drm/amd/display/dc/core/
H A Ddc_surface.c112 kref_init(&plane_state->refcount); in dc_create_plane_state()
178 kref_get(&plane_state->refcount); in dc_plane_state_retain()
183 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free()
190 kref_put(&plane_state->refcount, dc_plane_state_free); in dc_plane_state_release()
195 kref_get(&gamma->refcount); in dc_gamma_retain()
200 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free()
206 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release()
217 kref_init(&gamma->refcount); in dc_create_gamma()
226 kref_get(&tf->refcount); in dc_transfer_func_retain()
231 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free()
[all...]
H A Ddc_sink.c62 kref_get(&sink->refcount); in dc_sink_retain()
67 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free()
74 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release()
87 kref_init(&sink->refcount); in dc_sink_create()
/openbsd-src/usr.bin/ssh/
H A Dsshbuf.c48 u_int refcount; /* Tracks self and number of child buffers */ member
59 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity()
79 if (buf->off == 0 || buf->readonly || buf->refcount > 1) in sshbuf_maybe_pack()
100 ret->refcount = 1; in sshbuf_new()
119 ret->refcount = 1; in sshbuf_from()
138 child->parent->refcount++; in sshbuf_set_parent()
175 * refcount to 0 and trigger the actual free. in sshbuf_free()
177 buf->refcount--; in sshbuf_free()
178 if (buf->refcount > in sshbuf_free()
[all...]
/openbsd-src/gnu/usr.bin/binutils-2.17/bfd/
H A Delf-strtab.c35 unsigned int refcount; member
83 ret->refcount = 0; in elf_strtab_hash_newfunc()
157 entry->refcount++; in _bfd_elf_strtab_add()
185 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
195 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
196 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
205 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
224 BFD_ASSERT (entry->refcount > 0); in _bfd_elf_strtab_offset()
225 entry->refcount--; in _bfd_elf_strtab_offset()
242 BFD_ASSERT (tab->array[i]->refcount == 0); in _bfd_elf_strtab_emit()
[all …]
H A Delf32-vax.c638 if (h->got.refcount == -1) in elf_vax_check_relocs()
640 h->got.refcount = 1; in elf_vax_check_relocs()
645 h->got.refcount++; in elf_vax_check_relocs()
671 if (h->plt.refcount == -1) in elf_vax_check_relocs()
672 h->plt.refcount = 1; in elf_vax_check_relocs()
674 h->plt.refcount++; in elf_vax_check_relocs()
701 if (h->plt.refcount == -1) in elf_vax_check_relocs()
702 h->plt.refcount = 1; in elf_vax_check_relocs()
704 h->plt.refcount++; in elf_vax_check_relocs()
716 if (h->plt.refcount == -1) in elf_vax_check_relocs()
[all …]
H A Dbfdwin.c79 i->refcount--; in bfd_free_window()
83 if (i->refcount != 0) in bfd_free_window()
229 i->refcount = 1; in bfd_get_file_window()
H A Delf32-cris.c2011 if (h->got.refcount > 0)
2013 --h->got.refcount;
2014 if (h->got.refcount == 0)
2061 && h->plt.refcount > 0)
2062 --h->plt.refcount;
2095 if (h->root.got.refcount > 0)
2100 h->root.got.refcount += h->gotplt_refcount;
2115 h->root.got.refcount = h->gotplt_refcount;
2167 if (h->root.got.refcount <= 0 || h->root.plt.refcount <= 0)
2171 BFD_ASSERT (h->gotplt_refcount <= h->root.plt.refcount);
[all …]
/openbsd-src/gnu/usr.bin/binutils/bfd/
H A Delf-strtab.c35 unsigned int refcount; member
83 ret->refcount = 0; in elf_strtab_hash_newfunc()
156 entry->refcount++; in _bfd_elf_strtab_add()
184 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
194 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
195 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
204 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
223 BFD_ASSERT (entry->refcount > 0); in _bfd_elf_strtab_offset()
224 entry->refcount--; in _bfd_elf_strtab_offset()
241 BFD_ASSERT (tab->array[i]->refcount == 0); in _bfd_elf_strtab_emit()
[all …]
H A Delf32-vax.c653 if (h->got.refcount == -1)
655 h->got.refcount = 1;
660 h->got.refcount++;
686 if (h->plt.refcount == -1)
687 h->plt.refcount = 1;
689 h->plt.refcount++;
717 if (h->plt.refcount == -1)
718 h->plt.refcount = 1;
720 h->plt.refcount++;
732 if (h->plt.refcount == -1)
[all …]
H A Delf32-cris.c1829 if (h->got.refcount > 0)
1831 --h->got.refcount;
1832 if (h->got.refcount == 0)
1880 && h->plt.refcount > 0)
1881 --h->plt.refcount;
1917 if (h->root.got.refcount > 0)
1922 h->root.got.refcount += h->gotplt_refcount;
1933 h->root.got.refcount = h->gotplt_refcount;
1985 if (h->root.got.refcount <= 0 || h->root.plt.refcount <= 0)
1989 BFD_ASSERT (h->gotplt_refcount <= h->root.plt.refcount);
[all …]
H A Dbfdwin.c78 i->refcount--; in bfd_free_window()
82 if (i->refcount != 0) in bfd_free_window()
224 i->refcount = 1; in bfd_get_file_window()
/openbsd-src/sys/uvm/
H A Duvm_swap_encrypt.h51 u_int16_t refcount; /* pages that still need it */
69 if (key->refcount == 0)
71 key->refcount++;
77 key->refcount--;
78 if (key->refcount == 0)
52 u_int16_t refcount; /* pages that still need it */ global() member
/openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.dg/init/
H A Dref9.C5 int refcount; member
7 basic() : refcount(0) {} in basic()
23 inline ex::~ex() { if (--bp->refcount == 0) delete bp; } in ~ex()
27 bp->refcount++; in construct_from_basic()
/openbsd-src/lib/libcbor/src/cbor/
H A Dcommon.c79 item->refcount++; in cbor_incref()
85 CBOR_ASSERT(item->refcount > 0); in cbor_decref()
86 if (--item->refcount == 0) { in cbor_decref()
158 size_t cbor_refcount(const cbor_item_t *item) { return item->refcount; } in cbor_refcount()
161 item->refcount--; in cbor_move()
H A Dfloats_ctrls.c103 .refcount = 1, in cbor_new_ctrl()
116 .refcount = 1, in cbor_new_float2()
128 .refcount = 1, in cbor_new_float4()
140 .refcount = 1, in cbor_new_float8()
H A Dints.c92 .refcount = 1, in cbor_new_int8()
102 .refcount = 1, in cbor_new_int16()
112 .refcount = 1, in cbor_new_int32()
122 .refcount = 1, in cbor_new_int64()
/openbsd-src/sys/dev/pci/drm/display/
H A Ddrm_dp_aux_dev.c49 struct kref refcount; member
66 if (aux_dev && !kref_get_unless_zero(&aux_dev->refcount)) in drm_dp_aux_dev_get_by_minor()
83 kref_init(&aux_dev->refcount); in alloc_drm_dp_aux_dev()
100 container_of(ref, struct drm_dp_aux_dev, refcount); in release_drm_dp_aux_dev()
116 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in name_show()
236 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in auxdev_release()
300 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in drm_dp_aux_unregister_devnode()
/openbsd-src/sys/dev/pci/drm/apple/
H A Diomfb_template.c39 struct kref refcount; member
46 cookie = container_of(ref, struct dcp_wait_cookie, refcount); in release_wait_cookie()
704 struct kref refcount; member
712 cookie = container_of(ref, struct dcp_swap_cookie, refcount); in release_swap_cookie()
724 kref_put(&info->refcount, release_swap_cookie); in dcp_swap_cleared()
766 kref_put(&wait->refcount, release_wait_cookie); in dcp_on_final()
806 kref_init(&cookie->refcount); in DCP_FW_NAME()
807 /* increase refcount to ensure the receiver has a reference */ in DCP_FW_NAME()
808 kref_get(&cookie->refcount); in DCP_FW_NAME()
824 kref_put(&cookie->refcount, release_wait_cooki in DCP_FW_NAME()
[all...]
/openbsd-src/sys/dev/pci/drm/include/drm/
H A Ddrm_syncobj.h43 struct kref refcount; member
82 kref_get(&obj->refcount); in drm_syncobj_get()
92 kref_put(&obj->refcount, drm_syncobj_free); in drm_syncobj_put()
/openbsd-src/sys/dev/
H A Dcons.c226 static int refcount = 0; in cnpollc() local
231 --refcount; in cnpollc()
232 if (refcount == 0) in cnpollc()
235 ++refcount; in cnpollc()
/openbsd-src/sys/dev/pci/drm/amd/amdgpu/
H A Damdgpu_reset.h82 struct kref refcount; member
110 return kref_get_unless_zero(&domain->refcount) != 0; in amdgpu_reset_get_reset_domain()
116 kref_put(&domain->refcount, amdgpu_reset_destroy_reset_domain); in amdgpu_reset_put_reset_domain()
H A Damdgpu_bo_list.c51 refcount); in amdgpu_bo_list_free()
92 kref_init(&list->refcount); in amdgpu_bo_list_create()
175 kref_put(&list->refcount, amdgpu_bo_list_free); in amdgpu_bo_list_destroy()
184 if (*result && kref_get_unless_zero(&(*result)->refcount)) { in amdgpu_bo_list_get()
196 kref_put(&list->refcount, amdgpu_bo_list_free); in amdgpu_bo_list_put()
/openbsd-src/sys/dev/pci/drm/
H A Ddrm_mode_object.c60 kref_init(&obj->refcount); in __drm_mode_object_add()
159 if (!kref_get_unless_zero(&obj->refcount)) in __drm_mode_object_find()
200 DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); in drm_mode_object_put()
201 kref_put(&obj->refcount, obj->free_cb); in drm_mode_object_put()
217 DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); in drm_mode_object_get()
218 kref_get(&obj->refcount); in drm_mode_object_get()
/openbsd-src/gnu/usr.bin/perl/ext/XS-APItest/t/
H A Dmagic.t82 # without a corresponding refcount bump. If things work properly this
105 # what extra refcount is added to the SV by virtue of being on the
118 "\$a[0] is \$j, so refcount(\$j) should be 2");
127 # in this case we expect to have only 1 refcount,
130 "\$a[0] is not \$j, so refcount(\$j) should be 1");

12345678