Home
last modified time | relevance | path

Searched refs:ctl (Results 1 – 25 of 310) sorted by relevance

12345678910>>...13

/freebsd/sys/net/route/
H A Dnhop.c77 struct nh_control *ctl; in nhops_init_rib() local
82 ctl = malloc(sizeof(struct nh_control), M_NHOP, M_WAITOK | M_ZERO); in nhops_init_rib()
91 CHT_SLIST_INIT(&ctl->nh_head, ptr, num_buckets); in nhops_init_rib()
98 bitmask_init(&ctl->nh_idx_head, ptr, num_items); in nhops_init_rib()
100 NHOPS_LOCK_INIT(ctl); in nhops_init_rib()
102 rh->nh_control = ctl; in nhops_init_rib()
103 ctl->ctl_rh = rh; in nhops_init_rib()
105 FIB_CTL_LOG(LOG_DEBUG2, ctl, "nhops init: ctl %p rh %p", ctl, rh); in nhops_init_rib()
111 destroy_ctl(struct nh_control *ctl) in destroy_ctl() argument
114 NHOPS_LOCK_DESTROY(ctl); in destroy_ctl()
[all …]
H A Dnhgrp.c86 static void consider_resize(struct nh_control *ctl, uint32_t new_gr_buckets,
137 find_nhgrp(struct nh_control *ctl, const struct nhgrp_priv *key) in find_nhgrp() argument
141 NHOPS_RLOCK(ctl); in find_nhgrp()
142 CHT_SLIST_FIND_BYOBJ(&ctl->gr_head, mpath, key, priv_ret); in find_nhgrp()
149 NHOPS_RUNLOCK(ctl); in find_nhgrp()
155 link_nhgrp(struct nh_control *ctl, struct nhgrp_priv *grp_priv) in link_nhgrp() argument
160 NHOPS_WLOCK(ctl); in link_nhgrp()
162 new_num_buckets = CHT_SLIST_GET_RESIZE_BUCKETS(&ctl->gr_head); in link_nhgrp()
163 new_num_items = bitmask_get_resize_items(&ctl->nh_idx_head); in link_nhgrp()
165 if (bitmask_alloc_idx(&ctl->nh_idx_head, &idx) != 0) { in link_nhgrp()
[all …]
H A Dnhop_var.h63 #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 Dnhgrp_ctl.c79 static struct nhgrp_priv *get_nhgrp(struct nh_control *ctl,
337 struct nh_control *ctl; in nhgrp_free() local
373 ctl = nhg_priv->nh_control; in nhgrp_free()
374 if (unlink_nhgrp(ctl, nhg_priv) == NULL) { in nhgrp_free()
465 struct nh_control *ctl; in nhgrp_alloc() local
472 ctl = rh->nh_control; in nhgrp_alloc()
479 if (ctl->gr_head.hash_size == 0) { in nhgrp_alloc()
481 if (nhgrp_ctl_alloc_default(ctl, M_NOWAIT) == 0) { in nhgrp_alloc()
491 if (wn[i].nh->nh_priv->nh_control != ctl) { in nhgrp_alloc()
506 nhg_priv->nh_control = ctl; in nhgrp_alloc()
[all …]
H A Dnhop_ctl.c87 static int finalize_nhop(struct nh_control *ctl, struct nhop_object *nh, bool link);
489 finalize_nhop(struct nh_control *ctl, struct nhop_object *nh, bool link) in finalize_nhop() argument
515 MPASS(nh->nh_priv->nh_fibnum == ctl->ctl_rh->rib_fibnum); in finalize_nhop()
519 NHOPS_WLOCK(ctl); in finalize_nhop()
521 NHOPS_WUNLOCK(ctl); in finalize_nhop()
522 } else if (link_nhop(ctl, nh->nh_priv) == 0) { in finalize_nhop()
589 struct nh_control *ctl; in nhop_free() local
629 ctl = nh_priv->nh_control; in nhop_free()
630 if (unlink_nhop(ctl, nh_priv) == NULL) { in nhop_free()
1050 struct nh_control *ctl; in nhops_update_ifmtu() local
[all …]
/freebsd/sbin/ipf/ipsend/
H A Ddlcommon.c43 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 …]
/freebsd/contrib/bsddialog/lib/
H A Dslider.c380 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 …]
/freebsd/sys/netlink/route/
H A Dnexthop.c115 static void consider_resize(struct unhop_ctl *ctl, uint32_t new_size);
155 struct unhop_ctl *ctl = atomic_load_ptr(&V_un_ctl); in nl_find_nhop() local
158 if (__predict_false(ctl == NULL)) in nl_find_nhop()
172 UN_RLOCK(ctl); in nl_find_nhop()
173 CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop); in nl_find_nhop()
176 UN_RLOCK(ctl); in nl_find_nhop()
186 CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop); in nl_find_nhop()
188 UN_RUNLOCK(ctl); in nl_find_nhop()
193 UN_RUNLOCK(ctl); in nl_find_nhop()
214 UN_WLOCK(ctl); in nl_find_nhop()
[all …]
/freebsd/sys/dev/sound/pci/hda/
H A Dhdaa.h209 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 …]
/freebsd/contrib/bearssl/src/rsa/
H A Drsa_i15_privexp.c251 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 Drsa_i31_privexp.c251 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 …]
/freebsd/lib/libmixer/
H A Dmixer.c216 mix_ctl_t *ctl, *cp; in mixer_add_ctl() local
223 if ((ctl = calloc(1, sizeof(mix_ctl_t))) == NULL) in mixer_add_ctl()
225 ctl->parent_dev = parent_dev; in mixer_add_ctl()
226 ctl->id = id; in mixer_add_ctl()
228 (void)strlcpy(ctl->name, name, sizeof(ctl->name)); in mixer_add_ctl()
229 ctl->mod = mod; in mixer_add_ctl()
230 ctl->print = print; in mixer_add_ctl()
231 dp = ctl->parent_dev; in mixer_add_ctl()
239 TAILQ_INSERT_TAIL(&dp->ctls, ctl, ctls); in mixer_add_ctl()
249 mixer_add_ctl_s(mix_ctl_t *ctl) in mixer_add_ctl_s() argument
[all …]
/freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/
H A Dtread2.c66 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 Dtverify.c66 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 Dtdel.c63 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 Dtcreat3.c62 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 Dthash4.c64 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))) {
/freebsd/lib/libc/db/test/hash.tests/
H A Dtread2.c54 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 Dtverify.c54 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 Dtdel.c51 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 Dtcreat3.c50 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 Dthash4.c53 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))) {
/freebsd/contrib/libpcap/
H A Dpcap-enet.c148 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 Dpcap-dlpi.c187 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 …]
/freebsd/usr.sbin/sndctl/
H A Dsndctl.c655 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 …]

12345678910>>...13