| /freebsd/sys/compat/linuxkpi/common/include/linux/ |
| H A D | kref.h | 34 #include <sys/refcount.h> 39 #include <linux/refcount.h> 44 refcount_t refcount; 51 refcount_init((uint32_t *)&kref->refcount, 1); in kref_init() 58 return (refcount_load(__DECONST(u_int32_t *, &kref->refcount))); in kref_read() 65 refcount_acquire((uint32_t *)&kref->refcount); in kref_get() 72 if (refcount_release((uint32_t *)&kref->refcount)) { in kref_put() 84 if (refcount_release((uint32_t *)&kref->refcount)) { in kref_put_lock() 98 if (refcount_release((uint32_t *)&kref->refcount)) { in kref_sub() 110 return refcount_acquire_if_not_zero((uint32_t *)&kref->refcount); in kref_get_unless_zero() 45 atomic_t refcount; global() member [all...] |
| /freebsd/sys/contrib/openzfs/module/zfs/ |
| H A D | zfeature.c | 256 uint64_t refcount; in feature_get_refcount_from_disk() local 268 feature->fi_guid, sizeof (uint64_t), 1, &refcount); in feature_get_refcount_from_disk() 275 *res = refcount; in feature_get_refcount_from_disk() 305 feature_sync(spa_t *spa, zfeature_info_t *feature, uint64_t refcount, in feature_sync() argument 313 sizeof (uint64_t), 1, &refcount, tx)); in feature_sync() 326 atomic_swap_64(refcount_cache, refcount)); in feature_sync() 329 if (refcount == 0) in feature_sync() 409 uint64_t refcount = 0; in feature_do_action() local 423 VERIFY3U(feature_get_refcount(spa, feature, &refcount), !=, ENOTSUP); in feature_do_action() 427 VERIFY3U(refcount, !=, UINT64_MAX); in feature_do_action() [all …]
|
| /freebsd/sys/cam/ |
| H A D | cam_sim.c | 121 sim->refcount = 1; in cam_sim_alloc() 153 KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); in cam_sim_free() 154 sim->refcount--; in cam_sim_free() 155 if (sim->refcount > 0) { in cam_sim_free() 159 KASSERT(sim->refcount == 0, ("sim->refcount == 0")); in cam_sim_free() 181 KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); in cam_sim_release() 182 sim->refcount--; in cam_sim_release() 183 if (sim->refcount == 0) in cam_sim_release() 202 KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); in cam_sim_hold() 203 sim->refcount++; in cam_sim_hold()
|
| /freebsd/sys/dev/drm2/ |
| H A D | drm_global.c | 40 int refcount; member 53 item->refcount = 0; in drm_global_init() 63 MPASS(item->refcount == 0); in drm_global_release() 74 if (item->refcount == 0) { in drm_global_item_ref() 88 ++item->refcount; in drm_global_item_ref() 104 MPASS(item->refcount != 0); in drm_global_item_unref() 106 if (--item->refcount == 0) { in drm_global_item_unref()
|
| /freebsd/sys/contrib/openzfs/include/os/linux/zfs/sys/ |
| H A D | trace_dnode.h | 48 TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), 49 TP_ARGS(dn, refcount, dbufs), 69 __field(int64_t, refcount) 91 __entry->refcount = refcount; 105 __entry->dn_have_spill, __entry->refcount, __entry->dbufs) 111 TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \ 112 TP_ARGS(dn, refcount, dbufs))
|
| H A D | trace_zrlock.h | 50 __field(int32_t, refcount) 58 __entry->refcount = zrl->zr_refcount; 67 __entry->refcount, __entry->owner_pid, __entry->caller, 71 __entry->refcount, __entry->n)
|
| /freebsd/crypto/openssh/ |
| H A D | sshbuf.c | 50 u_int refcount; /* Tracks self and number of child buffers */ member 61 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity() 81 if (buf->off == 0 || buf->readonly || buf->refcount > 1) in sshbuf_maybe_pack() 102 ret->refcount = 1; in sshbuf_new() 121 ret->refcount = 1; in sshbuf_from() 140 child->parent->refcount++; in sshbuf_set_parent() 179 buf->refcount--; in sshbuf_free() 180 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 …]
|
| /freebsd/crypto/heimdal/lib/krb5/ |
| H A D | keytab_memory.c | 42 int refcount; member 64 if (d->refcount < 1) in mkt_resolve() 66 "refcount < 1 %d", d->refcount); in mkt_resolve() 67 d->refcount++; in mkt_resolve() 90 d->refcount = 1; in mkt_resolve() 105 if (d->refcount < 1) in mkt_close() 109 if (--d->refcount > 0) { in mkt_close()
|
| /freebsd/sys/dev/mlx5/mlx5_core/ |
| H A D | mlx5_rl.c | 124 if (entry->refcount == 0xFFFFFFFFU) { in mlx5_rl_add_rate() 128 } else if (entry->refcount != 0) { in mlx5_rl_add_rate() 130 entry->refcount++; in mlx5_rl_add_rate() 141 entry->refcount = 1; in mlx5_rl_add_rate() 172 if (!entry || !entry->refcount) { in mlx5_rl_remove_rate() 177 entry->refcount--; in mlx5_rl_remove_rate() 178 if (!entry->refcount) { in mlx5_rl_remove_rate()
|
| /freebsd/crypto/krb5/src/lib/krb5/ccache/ |
| H A D | ccbase.c | 475 m->refcount = 0; in k5_cc_mutex_init() 488 m->refcount = 0; in k5_cc_mutex_finish_init() 497 assert(m->refcount > 0); in k5_cc_mutex_assert_locked() 507 assert(m->refcount == 0); in k5_cc_mutex_assert_unlocked() 521 m->refcount = 1; in k5_cc_mutex_lock() 525 m->refcount++; in k5_cc_mutex_lock() 533 if ((m->owner != context) || (m->refcount < 1)) { in k5_cc_mutex_unlock() 537 m->refcount--; in k5_cc_mutex_unlock() 538 if (m->refcount == 0) { in k5_cc_mutex_unlock() 548 m->refcount = 0; in k5_cc_mutex_force_unlock() [all …]
|
| /freebsd/contrib/wpa/src/l2_packet/ |
| H A D | l2_packet_ndis.c | 54 int refcount; member 310 l2 = l2_ndisuio_global->l2[l2_ndisuio_global->refcount - 1]; in l2_packet_rx_event() 363 if (l2_ndisuio_global->refcount >= 2) { in l2_packet_init() 368 l2_ndisuio_global->refcount++; in l2_packet_init() 373 l2_ndisuio_global->l2[l2_ndisuio_global->refcount - 1] = l2; in l2_packet_init() 388 if (l2_ndisuio_global->refcount > 1) { in l2_packet_init() 472 l2_ndisuio_global->refcount--; in l2_packet_deinit() 473 l2_ndisuio_global->l2[l2_ndisuio_global->refcount] = NULL; in l2_packet_deinit() 474 if (l2_ndisuio_global->refcount) { in l2_packet_deinit()
|
| /freebsd/contrib/libcbor/src/cbor/ |
| H A D | common.c | 85 item->refcount++; in cbor_incref() 91 CBOR_ASSERT(item->refcount > 0); in cbor_decref() 92 if (--item->refcount == 0) { in cbor_decref() 162 size_t cbor_refcount(const cbor_item_t* item) { return item->refcount; } in cbor_refcount() 165 item->refcount--; in cbor_move()
|
| H A D | floats_ctrls.c | 107 .refcount = 1, in cbor_new_ctrl() 120 .refcount = 1, in cbor_new_float2() 132 .refcount = 1, in cbor_new_float4() 144 .refcount = 1, in cbor_new_float8()
|
| /freebsd/sys/dev/drm2/ttm/ |
| H A D | ttm_object.c | 67 u_int refcount; member 124 refcount_acquire(&tfile->refcount); in ttm_object_file_ref() 140 if (refcount_release(&tfile->refcount)) in ttm_object_file_unref() 161 refcount_init(&base->refcount, 1); in ttm_base_object_init() 218 if (refcount_release(&base->refcount)) in ttm_base_object_unref() 236 refcount_acquire(&base->refcount); in ttm_base_object_lookup() 296 refcount_acquire(&base->refcount); in ttm_ref_object_add() 394 refcount_init(&tfile->refcount, 1); in ttm_object_file_init()
|
| /freebsd/sys/dev/cxgbe/ |
| H A D | t4_clip.c | 84 int refcount; member 264 if (++ce->refcount == 1 && ce->pending && ce->clip_idx != -1) { in t4_get_clip_entry() 293 MPASS(ce->refcount > 0); /* Caller should already have a reference */ in t4_hold_clip_entry() 294 ce->refcount++; in t4_hold_clip_entry() 306 MPASS(ce->refcount > 0); in release_clip_entry_locked() 309 if (--ce->refcount == 0 && cde->krn_ref == 0) { in release_clip_entry_locked() 363 else if (ce->refcount == 0) in t4_release_clip_addr() 504 if (ce->refcount != 0 || cde->krn_ref != 0) { in update_sw_clip_table() 592 if (ce->refcount == 0 && cde->krn_ref == 0) { in update_hw_clip_table() 625 if (ce->refcount == 0 && cde->krn_ref == 0) { in update_hw_clip_table() [all …]
|
| H A D | t4_sched.c | 185 if (tc->refcount > 0 || tc->state == CS_HW_UPDATE_IN_PROGRESS) in set_sched_class_params() 209 MPASS(tc->refcount == 0); in set_sched_class_params() 226 MPASS(tc->refcount == 0); in set_sched_class_params() 286 if (tc->refcount > 0) in update_tx_sched() 352 tc->refcount++; in bind_txq_to_traffic_class() 380 MPASS(tc->refcount > 0); in bind_txq_to_traffic_class() 381 tc->refcount--; in bind_txq_to_traffic_class() 391 MPASS(tc->refcount > 0); in bind_txq_to_traffic_class() 392 tc->refcount--; in bind_txq_to_traffic_class() 526 tc->refcount in t4_reserve_cl_rl_kbps() [all...] |
| /freebsd/contrib/pkgconf/libpkgconf/ |
| H A D | dependency.c | 145 dep->refcount = 0; in pkgconf_dependency_addraw() 234 dep->refcount++; in pkgconf_dependency_ref() 235 PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount); in pkgconf_dependency_ref() 256 --dep->refcount; in pkgconf_dependency_unref() 257 PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount); in pkgconf_dependency_unref() 259 if (dep->refcount <= 0) in pkgconf_dependency_unref() 500 new_dep->refcount = 0; in pkgconf_dependency_copy()
|
| /freebsd/sys/ofed/include/rdma/ |
| H A D | rdmavt_mr.h | 87 atomic_t refcount; member 123 if (unlikely(atomic_dec_and_test(&mr->refcount))) in rvt_put_mr() 129 atomic_inc(&mr->refcount); in rvt_get_mr()
|
| /freebsd/sys/ofed/drivers/infiniband/core/ |
| H A D | ib_multicast.c | 69 atomic_t refcount; member 111 atomic_t refcount; member 125 atomic_t refcount; member 186 if (atomic_dec_and_test(&port->refcount)) in deref_port() 196 if (atomic_dec_and_test(&group->refcount)) { in release_group() 207 if (atomic_dec_and_test(&member->refcount)) in deref_member() 220 atomic_inc(&group->refcount); in queue_join() 409 atomic_inc(&member->refcount); in process_group_error() 453 atomic_inc(&member->refcount); in mcast_work_handler() 505 atomic_inc(&member->refcount); in process_join_error() [all …]
|
| /freebsd/crypto/krb5/src/lib/crypto/krb/ |
| H A D | key.c | 53 key->refcount = 1; in krb5_k_create_key() 68 key->refcount++; in krb5_k_reference_key() 78 if (key == NULL || --key->refcount > 0) in krb5_k_free_key()
|
| /freebsd/lib/libc/db/mpool/ |
| H A D | mpool.libtp | 132 bhp->refcount = 0; 148 buf_fids[i].refcount = 0; 332 bhp->refcount++; 335 buf_table + (bhp-bufhdr_table), bhp->refcount); 392 int close; /* should we dec refcount and possibly 406 invalidate = (buf_fids[fid].refcount == 1 && close); 417 buf_fids[fid].refcount--; 464 bhp->refcount++; 471 bhp->refcount--; 472 if ( bhp->refcount ) { [all …]
|
| /freebsd/sys/dev/mthca/ |
| H A D | mthca_memfree.c | 59 int refcount; member 151 icm->refcount = 0; in mthca_alloc_icm() 229 ++table->icm[i]->refcount; in mthca_table_get() 249 ++table->icm[i]->refcount; in mthca_table_get() 267 if (--table->icm[i]->refcount == 0) { in mthca_table_put() 405 ++table->icm[i]->refcount; in mthca_alloc_icm_table() 462 if ((db_tab->page[i].refcount >= MTHCA_DB_REC_PER_PAGE) || in mthca_map_user_db() 469 if (db_tab->page[i].refcount) { in mthca_map_user_db() 470 ++db_tab->page[i].refcount; in mthca_map_user_db() 496 db_tab->page[i].refcount = 1; in mthca_map_user_db() [all …]
|
| /freebsd/sys/dev/firewire/ |
| H A D | fwmem.c | 86 int refcount; member 286 fms->refcount++; in fwmem_open() 296 fms->refcount = 1; in fwmem_open() 299 printf("%s: refcount=%d\n", __func__, fms->refcount); in fwmem_open() 312 fms->refcount--; in fwmem_close() 315 printf("%s: refcount=%d\n", __func__, fms->refcount); in fwmem_close() 316 if (fms->refcount < 1) { in fwmem_close()
|
| /freebsd/sys/dev/mlx4/mlx4_ib/ |
| H A D | mlx4_ib_mcg.c | 124 atomic_t refcount; member 444 if (atomic_dec_and_test(&group->refcount)) { in release_group() 448 atomic_inc(&group->refcount); in release_group() 577 atomic_inc(&group->refcount); in mlx4_ib_mcg_timeout_handler() 579 safe_atomic_dec(&group->refcount); in mlx4_ib_mcg_timeout_handler() 779 atomic_inc(&group->refcount); in search_relocate_mgid0_group() 869 atomic_inc(&group->refcount); in acquire_group() 877 atomic_inc(&group->refcount); /* for the request */ in queue_req() 878 atomic_inc(&group->refcount); /* for scheduling the work */ in queue_req() 883 safe_atomic_dec(&group->refcount); in queue_req() [all …]
|
| /freebsd/contrib/libcbor/doc/source/api/ |
| H A D | item_reference_counting.rst | 26 …ion, or as a result of parsing) with reference count set to 1. When the refcount reaches zero, it … 28 Items containing nested items will be destroyed recursively - the refcount of every nested item wil… 30 The destruction is synchronous and renders any pointers to items with refcount zero invalid immedia…
|