| /src/sys/net/route/ |
| H A D | nhop.c | 78 struct nh_control *ctl; in nhops_init_rib() local 83 ctl = malloc(sizeof(struct nh_control), M_NHOP, M_WAITOK | M_ZERO); in nhops_init_rib() 92 CHT_SLIST_INIT(&ctl->nh_head, ptr, num_buckets); in nhops_init_rib() 99 bitmask_init(&ctl->nh_idx_head, ptr, num_items); in nhops_init_rib() 101 NHOPS_LOCK_INIT(ctl); in nhops_init_rib() 103 rh->nh_control = ctl; in nhops_init_rib() 104 ctl->ctl_rh = rh; in nhops_init_rib() 106 FIB_CTL_LOG(LOG_DEBUG2, ctl, "nhops init: ctl %p rh %p", ctl, rh); in nhops_init_rib() 112 destroy_ctl(struct nh_control *ctl) in destroy_ctl() argument 115 NHOPS_LOCK_DESTROY(ctl); in destroy_ctl() [all …]
|
| H A D | nhgrp.c | 87 static void consider_resize(struct nh_control *ctl, uint32_t new_gr_buckets, 138 find_nhgrp(struct nh_control *ctl, const struct nhgrp_priv *key) in find_nhgrp() argument 142 NHOPS_RLOCK(ctl); in find_nhgrp() 143 CHT_SLIST_FIND_BYOBJ(&ctl->gr_head, mpath, key, priv_ret); in find_nhgrp() 150 NHOPS_RUNLOCK(ctl); in find_nhgrp() 156 link_nhgrp(struct nh_control *ctl, struct nhgrp_priv *grp_priv) in link_nhgrp() argument 161 NHOPS_WLOCK(ctl); in link_nhgrp() 163 new_num_buckets = CHT_SLIST_GET_RESIZE_BUCKETS(&ctl->gr_head); in link_nhgrp() 164 new_num_items = bitmask_get_resize_items(&ctl->nh_idx_head); in link_nhgrp() 166 if (bitmask_alloc_idx(&ctl->nh_idx_head, &idx) != 0) { in link_nhgrp() [all …]
|
| H A D | nhop_var.h | 63 #define NHOPS_WLOCK(ctl) rw_wlock(&(ctl)->ctl_lock) argument 64 #define NHOPS_RLOCK(ctl) rw_rlock(&(ctl)->ctl_lock) argument 65 #define NHOPS_WUNLOCK(ctl) rw_wunlock(&(ctl)->ctl_lock) argument 66 #define NHOPS_RUNLOCK(ctl) rw_runlock(&(ctl)->ctl_lock) argument 67 #define NHOPS_LOCK_INIT(ctl) rw_init(&(ctl)->ctl_lock, "nhop_ctl") argument 68 #define NHOPS_LOCK_DESTROY(ctl) rw_destroy(&(ctl)->ctl_lock) argument 69 #define NHOPS_WLOCK_ASSERT(ctl) rw_assert(&(ctl)->ctl_lock, RA_WLOCKED) argument 103 struct nhop_priv *find_nhop(struct nh_control *ctl, 105 int link_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv); 106 struct nhop_priv *unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv);
|
| H A D | nhgrp_ctl.c | 80 static struct nhgrp_priv *get_nhgrp(struct nh_control *ctl, 338 struct nh_control *ctl; in nhgrp_free() local 374 ctl = nhg_priv->nh_control; in nhgrp_free() 375 if (unlink_nhgrp(ctl, nhg_priv) == NULL) { in nhgrp_free() 466 struct nh_control *ctl; in nhgrp_alloc() local 473 ctl = rh->nh_control; in nhgrp_alloc() 480 if (ctl->gr_head.hash_size == 0) { in nhgrp_alloc() 482 if (nhgrp_ctl_alloc_default(ctl, M_NOWAIT) == 0) { in nhgrp_alloc() 492 if (wn[i].nh->nh_priv->nh_control != ctl) { in nhgrp_alloc() 507 nhg_priv->nh_control = ctl; in nhgrp_alloc() [all …]
|
| /src/sbin/ipf/ipsend/ |
| H A D | dlcommon.c | 43 struct strbuf ctl; in dlinforeq() local 48 ctl.maxlen = 0; in dlinforeq() 49 ctl.len = sizeof (info_req); in dlinforeq() 50 ctl.buf = (char *) &info_req; in dlinforeq() 54 if (putmsg(fd, &ctl, (struct strbuf*) NULL, flags) < 0) in dlinforeq() 62 struct strbuf ctl; in dlinfoack() local 65 ctl.maxlen = MAXDLBUF; in dlinfoack() 66 ctl.len = 0; in dlinfoack() 67 ctl.buf = bufp; in dlinfoack() 69 strgetmsg(fd, &ctl, (struct strbuf*)NULL, &flags, "dlinfoack"); in dlinfoack() [all …]
|
| /src/contrib/bsddialog/lib/ |
| H A D | slider.c | 380 struct sliderctl ctl; in bsddialog_slider() local 391 ctl.spaces = blocks; in bsddialog_slider() 392 ctl.nspaces = nblocks; in bsddialog_slider() 393 ctl.length = length; in bsddialog_slider() 394 ctl.start = start; in bsddialog_slider() 395 ctl.end = end; in bsddialog_slider() 396 ctl.step = 1; in bsddialog_slider() 429 size = *(ctl.end) - *(ctl.start) + 1; in bsddialog_slider() 433 drawsquare(conf, step_win, RAISED, sel == STEP_WIN, "%15d", ctl.step); in bsddialog_slider() 484 ctl.op = MOVERIGHT; in bsddialog_slider() [all …]
|
| /src/sys/netlink/route/ |
| H A D | nexthop.c | 116 static void consider_resize(struct unhop_ctl *ctl, uint32_t new_size); 156 struct unhop_ctl *ctl = atomic_load_ptr(&V_un_ctl); in nl_find_nhop() local 159 if (__predict_false(ctl == NULL)) in nl_find_nhop() 173 UN_RLOCK(ctl); in nl_find_nhop() 174 CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop); in nl_find_nhop() 177 UN_RLOCK(ctl); in nl_find_nhop() 187 CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop); in nl_find_nhop() 189 UN_RUNLOCK(ctl); in nl_find_nhop() 194 UN_RUNLOCK(ctl); in nl_find_nhop() 215 UN_WLOCK(ctl); in nl_find_nhop() [all …]
|
| /src/sys/dev/sound/pci/hda/ |
| H A D | hdaa.h | 209 struct hdaa_audio_ctl *ctl; member 244 #define MINQDB(ctl) \ argument 245 ((0 - (ctl)->offset) * ((ctl)->size + 1)) 247 #define MAXQDB(ctl) \ argument 248 (((ctl)->step - (ctl)->offset) * ((ctl)->size + 1)) 250 #define RANGEQDB(ctl) \ argument 251 ((ctl)->step * ((ctl)->size + 1)) 253 #define VAL2QDB(ctl, val) \ argument 254 (((ctl)->size + 1) * ((int)(val) - (ctl)->offset)) 256 #define QDB2VAL(ctl, qdb) \ argument [all …]
|
| H A D | hdaa.c | 202 index == NULL || devinfo->ctl == NULL || in hdaa_audio_ctl_each() 206 return (&devinfo->ctl[(*index)++]); in hdaa_audio_ctl_each() 213 struct hdaa_audio_ctl *ctl; in hdaa_audio_ctl_amp_get() local 216 if (devinfo == NULL || devinfo->ctl == NULL) in hdaa_audio_ctl_amp_get() 220 while ((ctl = hdaa_audio_ctl_each(devinfo, &i)) != NULL) { in hdaa_audio_ctl_amp_get() 221 if (ctl->enable == 0) in hdaa_audio_ctl_amp_get() 223 if (ctl->widget->nid != nid) in hdaa_audio_ctl_amp_get() 225 if (dir && ctl->ndir != dir) in hdaa_audio_ctl_amp_get() 227 if (index >= 0 && ctl->ndir == HDAA_CTL_IN && in hdaa_audio_ctl_amp_get() 228 ctl->dir == ctl->ndir && ctl->index != index) in hdaa_audio_ctl_amp_get() [all …]
|
| /src/contrib/bearssl/src/rsa/ |
| H A D | rsa_i15_privexp.c | 251 uint32_t ctl; in br_rsa_i15_compute_privexp() local 262 ctl = GT(v1, v0); in br_rsa_i15_compute_privexp() 264 u0 -= (u1 - (r & -ctl)) & -sab; in br_rsa_i15_compute_privexp() 265 v0 -= (v1 - (e & -ctl)) & -sab; in br_rsa_i15_compute_privexp() 268 ctl = GT(v0, v1); in br_rsa_i15_compute_privexp() 270 u1 -= (u0 - (r & -ctl)) & -sba; in br_rsa_i15_compute_privexp() 271 v1 -= (v0 - (e & -ctl)) & -sba; in br_rsa_i15_compute_privexp() 277 ctl = v0 & 1; in br_rsa_i15_compute_privexp() 279 u0 ^= (u0 ^ ((u0 >> 1) + (hr & -ctl))) & -da; in br_rsa_i15_compute_privexp() 280 v0 ^= (v0 ^ ((v0 >> 1) + (he & -ctl))) & -da; in br_rsa_i15_compute_privexp() [all …]
|
| H A D | rsa_i31_privexp.c | 251 uint32_t ctl; in br_rsa_i31_compute_privexp() local 262 ctl = GT(v1, v0); in br_rsa_i31_compute_privexp() 264 u0 -= (u1 - (r & -ctl)) & -sab; in br_rsa_i31_compute_privexp() 265 v0 -= (v1 - (e & -ctl)) & -sab; in br_rsa_i31_compute_privexp() 268 ctl = GT(v0, v1); in br_rsa_i31_compute_privexp() 270 u1 -= (u0 - (r & -ctl)) & -sba; in br_rsa_i31_compute_privexp() 271 v1 -= (v0 - (e & -ctl)) & -sba; in br_rsa_i31_compute_privexp() 277 ctl = v0 & 1; in br_rsa_i31_compute_privexp() 279 u0 ^= (u0 ^ ((u0 >> 1) + (hr & -ctl))) & -da; in br_rsa_i31_compute_privexp() 280 v0 ^= (v0 ^ ((v0 >> 1) + (he & -ctl))) & -da; in br_rsa_i31_compute_privexp() [all …]
|
| /src/lib/libmixer/ |
| H A D | mixer.c | 218 mix_ctl_t *ctl, *cp; in mixer_add_ctl() local 225 if ((ctl = calloc(1, sizeof(mix_ctl_t))) == NULL) in mixer_add_ctl() 227 ctl->parent_dev = parent_dev; in mixer_add_ctl() 228 ctl->id = id; in mixer_add_ctl() 230 (void)strlcpy(ctl->name, name, sizeof(ctl->name)); in mixer_add_ctl() 231 ctl->mod = mod; in mixer_add_ctl() 232 ctl->print = print; in mixer_add_ctl() 233 dp = ctl->parent_dev; in mixer_add_ctl() 241 TAILQ_INSERT_TAIL(&dp->ctls, ctl, ctls); in mixer_add_ctl() 251 mixer_add_ctl_s(mix_ctl_t *ctl) in mixer_add_ctl_s() argument [all …]
|
| /src/lib/libc/db/test/hash.tests/ |
| H A D | tverify.c | 54 HASHINFO ctl; local 60 ctl.nelem = INITIAL; 61 ctl.hash = NULL; 62 ctl.bsize = 64; 63 ctl.ffactor = 1; 64 ctl.cachesize = 1024 * 1024; /* 1 MEG */ 65 ctl.lorder = 0; 66 if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
|
| H A D | tread2.c | 54 HASHINFO ctl; local 59 ctl.nelem = INITIAL; 60 ctl.hash = NULL; 61 ctl.bsize = 64; 62 ctl.ffactor = 1; 63 ctl.cachesize = atoi(*argv++); 64 ctl.lorder = 0; 65 if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
|
| H A D | tdel.c | 51 HASHINFO ctl; local 58 ctl.nelem = INITIAL; 59 ctl.hash = NULL; 60 ctl.bsize = atoi(*argv++); 61 ctl.ffactor = atoi(*argv++); 62 ctl.cachesize = 1024 * 1024; /* 1 MEG */ 63 ctl.lorder = 0; 65 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
|
| H A D | tcreat3.c | 50 HASHINFO ctl; local 57 ctl.hash = NULL; 58 ctl.bsize = atoi(*argv++); 59 ctl.ffactor = atoi(*argv++); 60 ctl.nelem = atoi(*argv++); 61 ctl.lorder = 0; 63 O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
|
| H A D | thash4.c | 53 HASHINFO ctl; local 61 ctl.hash = NULL; 62 ctl.bsize = atoi(*argv++); 63 ctl.ffactor = atoi(*argv++); 64 ctl.nelem = atoi(*argv++); 65 ctl.cachesize = atoi(*argv++); 66 ctl.lorder = 0; 67 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
|
| /src/crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/ |
| H A D | tread2.c | 66 HASHINFO ctl; local 71 ctl.nelem = INITIAL; 72 ctl.hash = NULL; 73 ctl.bsize = 64; 74 ctl.ffactor = 1; 75 ctl.cachesize = atoi(*argv++); 76 ctl.lorder = 0; 77 if (!(dbp = dbopen( "hashtest", O_RDONLY|O_BINARY, 0400, DB_HASH, &ctl))) {
|
| H A D | tverify.c | 66 HASHINFO ctl; local 72 ctl.nelem = INITIAL; 73 ctl.hash = NULL; 74 ctl.bsize = 64; 75 ctl.ffactor = 1; 76 ctl.cachesize = 1024 * 1024; /* 1 MEG */ 77 ctl.lorder = 0; 78 if (!(dbp = dbopen( "hashtest", O_RDONLY|O_BINARY, 0400, DB_HASH, &ctl))) {
|
| H A D | tdel.c | 63 HASHINFO ctl; local 70 ctl.nelem = INITIAL; 71 ctl.hash = NULL; 72 ctl.bsize = atoi(*argv++); 73 ctl.ffactor = atoi(*argv++); 74 ctl.cachesize = 1024 * 1024; /* 1 MEG */ 75 ctl.lorder = 0; 77 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
|
| H A D | tcreat3.c | 62 HASHINFO ctl; local 69 ctl.hash = NULL; 70 ctl.bsize = atoi(*argv++); 71 ctl.ffactor = atoi(*argv++); 72 ctl.nelem = atoi(*argv++); 73 ctl.lorder = 0; 75 O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0600, DB_HASH, &ctl))){
|
| H A D | thash4.c | 64 HASHINFO ctl; local 72 ctl.hash = NULL; 73 ctl.bsize = atoi(*argv++); 74 ctl.ffactor = atoi(*argv++); 75 ctl.nelem = atoi(*argv++); 76 ctl.cachesize = atoi(*argv++); 77 ctl.lorder = 0; 78 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
|
| /src/contrib/libpcap/ |
| H A D | pcap-enet.c | 148 struct eniocb ctl; in initdevice() local 168 if (ioctl(if_fd, EIOCGETP, (char *)&ctl) == -1) { in initdevice() 176 ctl.en_rtout = 1 * ctl.en_hz; in initdevice() 177 ctl.en_tr_etherhead = 1; in initdevice() 178 ctl.en_tap_network = 1; in initdevice() 179 ctl.en_multi_packet = 1; in initdevice() 180 ctl.en_maxlen = BUFSPACE; in initdevice() 182 ctl.en_rtout = 64; /* randomly picked value for HZ */ in initdevice() 184 if (ioctl(if_fd, EIOCSETP, &ctl) == -1) { in initdevice() 200 maxwaiting = ctl.en_maxwaiting; in initdevice()
|
| H A D | pcap-dlpi.c | 187 struct strbuf ctl = { in pcap_read_dlpi() local 219 ctl.buf = (char *)ctlbuf; in pcap_read_dlpi() 220 ctl.maxlen = MAXDLBUF; in pcap_read_dlpi() 221 ctl.len = 0; in pcap_read_dlpi() 222 if (getmsg(p->fd, &ctl, &data, &flags) < 0) { in pcap_read_dlpi() 1262 struct strbuf ctl; local 1265 ctl.maxlen = 0; 1266 ctl.len = len; 1267 ctl.buf = ptr; 1270 if (putmsg(fd, &ctl, (struct strbuf *) NULL, flags) < 0) { [all …]
|
| /src/usr.sbin/sndctl/ |
| H A D | sndctl.c | 655 print_dev_ctl(struct snd_dev *dp, struct snd_ctl *ctl, bool simple, in print_dev_ctl() argument 661 if (ctl->type != GRP && xo_get_style(NULL) == XO_STYLE_TEXT) { in print_dev_ctl() 663 printf("%s=", ctl->name); in print_dev_ctl() 665 printf(" %-20s= ", ctl->name); in print_dev_ctl() 668 switch (ctl->type) { in print_dev_ctl() 670 xo_emit("{a:%s/%s}\n", ctl->name, (char *)dp + ctl->off); in print_dev_ctl() 673 xo_emit("{a:%s/%d}\n", ctl->name, *(int *)((intptr_t)dp + ctl->off)); in print_dev_ctl() 681 len = strlen(ctl->name); in print_dev_ctl() 682 if (strncmp(ctl->name, cp->name, len) == 0 && in print_dev_ctl() 691 print_chan_ctl(struct snd_chan *ch, struct snd_ctl *ctl, bool simple, in print_chan_ctl() argument [all …]
|