/freebsd/contrib/llvm-project/libcxx/src/ |
H A D | hash.cpp | 93 const std::size_t q = n / p; 94 if (q < p) 96 if (n == q * p) 103 std::size_t q = n / i; 104 if (q < i) 106 if (n == q * i) 110 q = n / i; 111 if (q < i) 113 if (n == q * i) 117 q 198 const std::size_t q = n / p; __next_prime() local 209 std::size_t q = n / i; __next_prime() local [all...] |
/freebsd/sys/sys/ |
H A D | qmath.h | 61 #define Q_BT(q) __typeof(1 * q) argument 64 #define Q_BT(q) __typeof(q) argument 68 #define Q_TC(q, v) ((__typeof(q))(v)) argument 71 #define Q_NTBITS(q) ((uint32_t)(sizeof(q) << 3)) argument 77 #define Q_NFCBITS(q) \ argument 78 ((uint32_t)(((Q_GCRAW(q) & 0x3) + 1) << ((Q_GCRAW(q) & 0x4) ? 4 : 1))) 81 #define Q_MINNFBITS(q) ((uint32_t)(2)) argument 82 #define Q_MAXNFBITS(q) ((uint32_t)(Q_NTBITS(q) - Q_SIGNED(q) - Q_NCBITS)) argument 90 #define Q_NFBITS(q) \ argument 91 (Q_NFCBITS(q) > Q_MAXNFBITS(q) ? Q_MAXNFBITS(q) : Q_NFCBITS(q)) [all …]
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | bqueue.c | 23 obj2node(bqueue_t *q, void *data) in obj2node() argument 25 return ((bqueue_node_t *)((char *)data + q->bq_node_offset)); in obj2node() 52 bqueue_init(bqueue_t *q, uint_t fill_fraction, size_t size, size_t node_offset) in bqueue_init() argument 57 list_create(&q->bq_list, node_offset + sizeof (bqueue_node_t), in bqueue_init() 59 list_create(&q->bq_dequeuing_list, node_offset + sizeof (bqueue_node_t), in bqueue_init() 61 list_create(&q->bq_enqueuing_list, node_offset + sizeof (bqueue_node_t), in bqueue_init() 63 cv_init(&q->bq_add_cv, NULL, CV_DEFAULT, NULL); in bqueue_init() 64 cv_init(&q->bq_pop_cv, NULL, CV_DEFAULT, NULL); in bqueue_init() 65 mutex_init(&q->bq_lock, NULL, MUTEX_DEFAULT, NULL); in bqueue_init() 66 q->bq_node_offset = node_offset; in bqueue_init() [all …]
|
/freebsd/sys/netgraph/bluetooth/include/ |
H A D | ng_bluetooth.h | 76 #define NG_BT_MBUFQ_INIT(q, _maxlen) \ argument 78 (q)->head = NULL; \ 79 (q)->tail = NULL; \ 80 (q)->len = 0; \ 81 (q)->maxlen = (_maxlen); \ 82 (q)->drops = 0; \ 85 #define NG_BT_MBUFQ_DESTROY(q) \ argument 87 NG_BT_MBUFQ_DRAIN((q)); \ 90 #define NG_BT_MBUFQ_FIRST(q) (q)->head argument 92 #define NG_BT_MBUFQ_LEN(q) (q)->len argument [all …]
|
/freebsd/contrib/bearssl/src/symcipher/ |
H A D | aes_ct_ctrcbc.c | 74 uint32_t q[8], carry; in br_aes_ct_ctrcbc_ctr() local 81 q[0] = br_swap32(iv0); in br_aes_ct_ctrcbc_ctr() 82 q[2] = br_swap32(iv1); in br_aes_ct_ctrcbc_ctr() 83 q[4] = br_swap32(iv2); in br_aes_ct_ctrcbc_ctr() 84 q[6] = br_swap32(iv3); in br_aes_ct_ctrcbc_ctr() 92 q[1] = br_swap32(iv0); in br_aes_ct_ctrcbc_ctr() 93 q[3] = br_swap32(iv1); in br_aes_ct_ctrcbc_ctr() 94 q[5] = br_swap32(iv2); in br_aes_ct_ctrcbc_ctr() 95 q[7] = br_swap32(iv3); in br_aes_ct_ctrcbc_ctr() 106 br_aes_ct_ortho(q); in br_aes_ct_ctrcbc_ctr() [all …]
|
H A D | aes_ct64_dec.c | 29 br_aes_ct64_bitslice_invSbox(uint64_t *q) in br_aes_ct64_bitslice_invSbox() argument 37 q0 = ~q[0]; in br_aes_ct64_bitslice_invSbox() 38 q1 = ~q[1]; in br_aes_ct64_bitslice_invSbox() 39 q2 = q[2]; in br_aes_ct64_bitslice_invSbox() 40 q3 = q[3]; in br_aes_ct64_bitslice_invSbox() 41 q4 = q[4]; in br_aes_ct64_bitslice_invSbox() 42 q5 = ~q[5]; in br_aes_ct64_bitslice_invSbox() 43 q6 = ~q[6]; in br_aes_ct64_bitslice_invSbox() 44 q7 = q[7]; in br_aes_ct64_bitslice_invSbox() 45 q[7] = q1 ^ q4 ^ q6; in br_aes_ct64_bitslice_invSbox() [all …]
|
H A D | aes_ct_dec.c | 29 br_aes_ct_bitslice_invSbox(uint32_t *q) in br_aes_ct_bitslice_invSbox() argument 51 q0 = ~q[0]; in br_aes_ct_bitslice_invSbox() 52 q1 = ~q[1]; in br_aes_ct_bitslice_invSbox() 53 q2 = q[2]; in br_aes_ct_bitslice_invSbox() 54 q3 = q[3]; in br_aes_ct_bitslice_invSbox() 55 q4 = q[4]; in br_aes_ct_bitslice_invSbox() 56 q5 = ~q[5]; in br_aes_ct_bitslice_invSbox() 57 q6 = ~q[6]; in br_aes_ct_bitslice_invSbox() 58 q7 = q[7]; in br_aes_ct_bitslice_invSbox() 59 q[7] = q1 ^ q4 ^ q6; in br_aes_ct_bitslice_invSbox() [all …]
|
H A D | aes_ct64_enc.c | 28 add_round_key(uint64_t *q, const uint64_t *sk) in add_round_key() argument 30 q[0] ^= sk[0]; in add_round_key() 31 q[1] ^= sk[1]; in add_round_key() 32 q[2] ^= sk[2]; in add_round_key() 33 q[3] ^= sk[3]; in add_round_key() 34 q[4] ^= sk[4]; in add_round_key() 35 q[5] ^= sk[5]; in add_round_key() 36 q[6] ^= sk[6]; in add_round_key() 37 q[7] ^= sk[7]; in add_round_key() 41 shift_rows(uint64_t *q) in shift_rows() argument [all …]
|
H A D | aes_ct_enc.c | 28 add_round_key(uint32_t *q, const uint32_t *sk) in add_round_key() argument 30 q[0] ^= sk[0]; in add_round_key() 31 q[1] ^= sk[1]; in add_round_key() 32 q[2] ^= sk[2]; in add_round_key() 33 q[3] ^= sk[3]; in add_round_key() 34 q[4] ^= sk[4]; in add_round_key() 35 q[5] ^= sk[5]; in add_round_key() 36 q[6] ^= sk[6]; in add_round_key() 37 q[7] ^= sk[7]; in add_round_key() 41 shift_rows(uint32_t *q) in shift_rows() argument [all …]
|
H A D | aes_ct64.c | 29 br_aes_ct64_bitslice_Sbox(uint64_t *q) in br_aes_ct64_bitslice_Sbox() argument 56 x0 = q[7]; in br_aes_ct64_bitslice_Sbox() 57 x1 = q[6]; in br_aes_ct64_bitslice_Sbox() 58 x2 = q[5]; in br_aes_ct64_bitslice_Sbox() 59 x3 = q[4]; in br_aes_ct64_bitslice_Sbox() 60 x4 = q[3]; in br_aes_ct64_bitslice_Sbox() 61 x5 = q[2]; in br_aes_ct64_bitslice_Sbox() 62 x6 = q[1]; in br_aes_ct64_bitslice_Sbox() 63 x7 = q[0]; in br_aes_ct64_bitslice_Sbox() 194 q[7] = s0; in br_aes_ct64_bitslice_Sbox() [all …]
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_mbq.c | 48 static inline void __mbq_init(struct mbq *q) in __mbq_init() argument 50 q->head = q->tail = NULL; in __mbq_init() 51 q->count = 0; in __mbq_init() 55 void mbq_safe_init(struct mbq *q) in mbq_safe_init() argument 57 mtx_init(&q->lock, "mbq", NULL, MTX_SPIN); in mbq_safe_init() 58 __mbq_init(q); in mbq_safe_init() 62 void mbq_init(struct mbq *q) in mbq_init() argument 64 __mbq_init(q); in mbq_init() 68 static inline void __mbq_enqueue(struct mbq *q, struct mbuf *m) in __mbq_enqueue() argument 71 if (q->tail) { in __mbq_enqueue() [all …]
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_string.c | 41 char *p, *q, c; in stresc2chr() local 45 for (p = q = s; (c = *p) != '\0'; p++) { in stresc2chr() 69 *q++ = c; in stresc2chr() 73 *q++ = '\a'; in stresc2chr() 76 *q++ = '\b'; in stresc2chr() 79 *q++ = '\f'; in stresc2chr() 82 *q++ = '\n'; in stresc2chr() 85 *q++ = '\r'; in stresc2chr() 88 *q++ = '\t'; in stresc2chr() 91 *q++ = '\v'; in stresc2chr() [all …]
|
/freebsd/sys/net/altq/ |
H A D | altq_classq.h | 69 #define qtype(q) (q)->qtype_ /* Get queue type */ argument 70 #define qlimit(q) (q)->qlim_ /* Max packets to be queued */ argument 71 #define qlen(q) (q)->qlen_ /* Current queue length. */ argument 72 #define qsize(q) (q)->qsize_ /* Current queue size. */ argument 73 #define qtail(q) (q)->tail_ /* Tail of the queue */ argument 74 #define qhead(q) ((q)->tail_ ? (q)->tail_->m_nextpkt : NULL) argument 76 #define qempty(q) ((q)->qlen_ == 0) /* Is the queue empty?? */ argument 77 #define q_is_codel(q) ((q)->qtype_ == Q_CODEL) /* Is the queue a codel queue */ argument 78 #define q_is_red(q) ((q)->qtype_ == Q_RED) /* Is the queue a red queue */ argument 79 #define q_is_rio(q) ((q)->qtype_ == Q_RIO) /* Is the queue a rio queue */ argument [all …]
|
/freebsd/usr.sbin/ypserv/ |
H A D | yp_dnslookup.c | 150 register struct circleq_dnsentry *q; in yp_malloc_dnsent() local 152 q = malloc(sizeof(struct circleq_dnsentry)); in yp_malloc_dnsent() 154 if (q == NULL) { in yp_malloc_dnsent() 159 return(q); in yp_malloc_dnsent() 203 register struct circleq_dnsentry *q; in yp_find_dnsqent() local 205 TAILQ_FOREACH(q, &qhead, links) { in yp_find_dnsqent() 208 if (id == q->xid) in yp_find_dnsqent() 209 return(q); in yp_find_dnsqent() 213 if (id == q->id) in yp_find_dnsqent() 214 return(q); in yp_find_dnsqent() [all …]
|
/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_write_format_zip_compression_store.c | 135 * q walks over the local headers, the data and the data descriptors. */ in verify_uncompressed_contents() 136 const char *p, *q, *local_header, *extra_start; in verify_uncompressed_contents() 207 local_header = q = buff; in verify_uncompressed_contents() 208 assertEqualMem(q, "PK\003\004", 4); /* Signature */ in verify_uncompressed_contents() 209 assertEqualInt(i2(q + 4), 10); /* Version needed to extract */ in verify_uncompressed_contents() 210 assertEqualInt(i2(q + 6), 8); /* Flags: bit 3 = length-at-end. Required because CRC32 is unknown */ in verify_uncompressed_contents() 211 assertEqualInt(i2(q + 8), 0); /* Compression method */ in verify_uncompressed_contents() 212 assertEqualInt(i2(q + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */ in verify_uncompressed_contents() 213 assertEqualInt(i2(q + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */ in verify_uncompressed_contents() 214 assertEqualInt(i4(q in verify_uncompressed_contents() 137 const char *p, *q, *local_header, *extra_start; verify_uncompressed_contents() local [all...] |
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | dma.c | 188 mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q) in mt76_dma_sync_idx() argument 190 Q_WRITE(dev, q, desc_base, q->desc_dma); in mt76_dma_sync_idx() 191 Q_WRITE(dev, q, ring_size, q->ndesc); in mt76_dma_sync_idx() 192 q->head = Q_READ(dev, q, dma_idx); in mt76_dma_sync_idx() 193 q->tail = q->head; in mt76_dma_sync_idx() 197 mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q) in mt76_dma_queue_reset() argument 201 if (!q || !q->ndesc) in mt76_dma_queue_reset() 205 for (i = 0; i < q->ndesc; i++) in mt76_dma_queue_reset() 206 q->desc[i].ctrl = cpu_to_le32(MT_DMA_CTL_DMA_DONE); in mt76_dma_queue_reset() 208 Q_WRITE(dev, q, cpu_idx, 0); in mt76_dma_queue_reset() [all …]
|
/freebsd/contrib/sendmail/src/ |
H A D | arpadate.c | 60 register char *q; variable 84 q = b; 87 *q++ = *p++; 88 *q++ = *p++; 89 *q++ = *p++; 90 *q++ = ','; 91 *q++ = ' '; 97 *q++ = *p++; 98 *q++ = *p++; 99 *q++ = ' '; [all …]
|
/freebsd/contrib/unbound/libunbound/ |
H A D | context.c | 131 context_query_delete(struct ctx_query* q) in context_query_delete() argument 133 if(!q) return; in context_query_delete() 134 ub_resolve_free(q->res); in context_query_delete() 135 free(q->msg); in context_query_delete() 136 free(q); in context_query_delete() 160 struct ctx_query* q = (struct ctx_query*)calloc(1, sizeof(*q)); in context_new() local 161 if(!q) return NULL; in context_new() 163 if(!find_id(ctx, &q->querynum)) { in context_new() 165 free(q); in context_new() 169 q->node.key = &q->querynum; in context_new() [all …]
|
/freebsd/sys/dev/neta/ |
H A D | if_mvnetareg.h | 124 #define MVNETA_PRXC(q) (0x1400 + ((q) << 2)) /*Port RX queues Config*/ argument 125 #define MVNETA_PRXSNP(q) (0x1420 + ((q) << 2)) /* Port RX queues Snoop */ argument 126 #define MVNETA_PRXDQA(q) (0x1480 + ((q) << 2)) /*P RXqueues desc Q Addr*/ argument 127 #define MVNETA_PRXDQS(q) (0x14a0 + ((q) << 2)) /*P RXqueues desc Q Size*/ argument 128 #define MVNETA_PRXDQTH(q) (0x14c0 + ((q) << 2)) /*P RXqueues desc Q Thrs*/ argument 129 #define MVNETA_PRXS(q) (0x14e0 + ((q) << 2)) /*Port RX queues Status */ argument 130 #define MVNETA_PRXSU(q) (0x1500 + ((q) << 2)) /*P RXqueues Stat Update*/ argument 131 #define MVNETA_PRXDI(q) (0x1520 + ((q) << 2)) /*P RXqueues Stat Update*/ argument 144 #define MVNETA_PTXDQA(q) (0x3c00 + ((q) << 2)) /*P TXqueues desc Q Addr*/ argument 145 #define MVNETA_PTXDQS(q) (0x3c20 + ((q) << 2)) /*P TXqueues desc Q Size*/ argument [all …]
|
/freebsd/crypto/heimdal/lib/asn1/ |
H A D | der_cmp.c | 37 der_heim_oid_cmp(const heim_oid *p, const heim_oid *q) in der_heim_oid_cmp() argument 39 if (p->length != q->length) in der_heim_oid_cmp() 40 return p->length - q->length; in der_heim_oid_cmp() 42 q->components, in der_heim_oid_cmp() 48 const heim_octet_string *q) in der_heim_octet_string_cmp() argument 50 if (p->length != q->length) in der_heim_octet_string_cmp() 51 return p->length - q->length; in der_heim_octet_string_cmp() 52 return memcmp(p->data, q->data, p->length); in der_heim_octet_string_cmp() 57 const heim_printable_string *q) in der_printable_string_cmp() argument 59 return der_heim_octet_string_cmp(p, q); in der_printable_string_cmp() [all …]
|
/freebsd/contrib/netbsd-tests/fs/ffs/ |
H A D | t_quotalimit.sh | 30 for q in "user" "group"; do 31 test_case_root limit_${e}_${v}_${q} limit_quota \ 32 "hit hard limit quota with ${q} enabled" -b ${e} ${v} ${q} 33 test_case_root limit_${e}_${v}_${q}_log limit_quota \ 34 "hit hard limit quota with ${q} enabled, WAPBL" -bl ${e} ${v} ${q} 35 test_case_root slimit_${e}_${v}_${q} limit_softquota \ 36 "hit soft limit quota with ${q} enabled after grace time" \ 37 -b ${e} ${v} ${q} 38 test_case_root inolimit_${e}_${v}_${q} limit_iquota \ 39 "hit hard limit ino quota with ${q} enabled" -b ${e} ${v} ${q} [all …]
|
/freebsd/lib/msun/tests/ |
H A D | rem_test.c | 108 int q; in test_invalid() local 110 q = 0xdeadbeef; in test_invalid() 113 ATF_CHECK(isnan(remquo(x, y, &q))); in test_invalid() 115 ATF_CHECK(q == 0xdeadbeef); in test_invalid() 119 ATF_CHECK(isnan(remquof(x, y, &q))); in test_invalid() 121 ATF_CHECK(q == 0xdeadbeef); in test_invalid() 125 ATF_CHECK(isnan(remquol(x, y, &q))); in test_invalid() 127 ATF_CHECK(q == 0xdeadbeef); in test_invalid() 141 int q; in testl() local 144 q = random(); in testl() [all …]
|
/freebsd/usr.sbin/pw/ |
H A D | pw_conf.c | 229 char *q; in newstr() local 234 if ((q = strdup(p)) == NULL) in newstr() 237 return (q); in newstr() 258 char *q = strtok(NULL, toks); in read_userconfig() local 266 printf("Got unknown kwd `%s' val=`%s'\n", p, q ? q : ""); in read_userconfig() 268 printf("Got kwd[%s]=%s\n", p, q); in read_userconfig() 272 config.default_password = passwd_val(q, 1); in read_userconfig() 275 config.reuse_uids = boolean_val(q, 0); in read_userconfig() 278 config.reuse_gids = boolean_val(q, 0); in read_userconfig() 281 config.nispasswd = (q == NULL || !boolean_val(q, 1)) in read_userconfig() [all …]
|
/freebsd/sys/netpfil/ipfw/ |
H A D | dn_sched_qfq.c | 60 static void dump_sched(struct qfq_sched *q, const char *msg); 263 static inline struct qfq_group *qfq_ffs(struct qfq_sched *q, in qfq_ffs() argument 267 return &q->groups[index]; in qfq_ffs() 304 struct qfq_sched *q = (struct qfq_sched *)(_q->_si + 1); in qfq_new_queue() local 320 if (q->wsum + w > QFQ_MAX_WSUM) in qfq_new_queue() 324 cl->grp = &q->groups[i]; in qfq_new_queue() 325 q->wsum += w; in qfq_new_queue() 326 q->iwsum = ONE_FP / q->wsum; /* XXX note theory */ in qfq_new_queue() 335 struct qfq_sched *q = (struct qfq_sched *)(_q->_si + 1); in qfq_free_queue() local 338 q->wsum -= ONE_FP/cl->inv_w; in qfq_free_queue() [all …]
|
/freebsd/sys/dev/ath/ath_hal/ar5211/ |
H A D | ar5211_xmit.c | 80 ar5211SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo) in ar5211SetTxQueueProps() argument 84 if (q >= HAL_NUM_TX_QUEUES) { in ar5211SetTxQueueProps() 86 __func__, q); in ar5211SetTxQueueProps() 89 return ath_hal_setTxQProps(ah, &ahp->ah_txq[q], qInfo); in ar5211SetTxQueueProps() 96 ar5211GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo) in ar5211GetTxQueueProps() argument 100 if (q >= HAL_NUM_TX_QUEUES) { in ar5211GetTxQueueProps() 102 __func__, q); in ar5211GetTxQueueProps() 105 return ath_hal_getTxQProps(ah, qInfo, &ahp->ah_txq[q]); in ar5211GetTxQueueProps() 117 int q; in ar5211SetupTxQueue() local 121 q = 9; in ar5211SetupTxQueue() [all …]
|