/freebsd/contrib/llvm-project/libcxx/src/ |
H A D | hash.cpp | 1 //===---------- 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 | 1 /*- 2 * Copyright (c) 2018-2024 Netflix, Inc. 28 * Data types and APIs for fixed-point math based on the "Q" number format. 33 * bits 1-2 specify the radix point shift index i.e. 00,01,10,11 == 1,2,3,4 36 * This scheme can therefore represent Q numbers with [2,4,6,8,16,32,48,64] bits 60 /* Ancient GCC hack to de-const, remove when GCC4 is removed. */ 61 #define Q_BT(q) __typeof(1 * q) argument 63 /* The underlying base type of 'q'. */ 64 #define Q_BT(q) __typeof(q) argument 67 /* Type-cast variable 'v' to the same underlying type as 'q'. */ [all …]
|
/freebsd/bin/sh/tests/expansion/ |
H A D | trim9.0 | 24 testcase 'shift $#; set -- "${*#Q}"' '1|' 25 testcase 'shift $#; set -- "${*##Q}"' '1|' 26 testcase 'shift $#; set -- "${*%Q}"' '1|' 27 testcase 'shift $#; set -- "${*%%Q}"' '1|' 28 testcase 'set -- Q R; set -- "${*#Q}"' '1| R' 29 testcase 'set -- Q R; set -- "${*##Q}"' '1| R' 30 testcase 'set -- Q R; set -- "${*%R}"' '1|Q ' 31 testcase 'set -- Q R; set -- "${*%%R}"' '1|Q ' 32 testcase 'set -- Q R; set -- "${*#S}"' '1|Q R' 33 testcase 'set -- Q R; set -- "${*##S}"' '1|Q R' [all …]
|
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | dma.c | 1 // SPDX-License-Identifier: ISC 6 #include <linux/dma-mapping.h> 19 if ((_q)->flags & MT_QFLAG_WED) \ 20 _val = mtk_wed_device_reg_read(&(_dev)->mmio.wed, \ 21 ((_q)->wed_regs + \ 24 _val = readl(&(_q)->regs->_field); \ 30 if ((_q)->flags & MT_QFLAG_WED) \ 31 mtk_wed_device_reg_write(&(_dev)->mmio.wed, \ 32 ((_q)->wed_regs + _offset), \ 35 writel(_val, &(_q)->regs->_field); \ [all …]
|
H A D | usb.c | 1 // SPDX-License-Identifier: ISC 16 MODULE_PARM_DESC(disable_usb_sg, "Disable usb scatter-gather support"); 21 struct usb_interface *uintf = to_usb_interface(dev->dev); in __mt76u_vendor_request() 26 lockdep_assert_held(&dev->usb.usb_ctrl_mtx); in __mt76u_vendor_request() 31 if (test_bit(MT76_REMOVED, &dev->phy.state)) in __mt76u_vendor_request() 32 return -EIO; in __mt76u_vendor_request() 36 if (ret == -ENODEV) in __mt76u_vendor_request() 37 set_bit(MT76_REMOVED, &dev->phy.state); in __mt76u_vendor_request() 38 if (ret >= 0 || ret == -ENODEV) in __mt76u_vendor_request() 43 dev_err(dev->dev, "vendor request req:%02x off:%04x failed:%d\n", in __mt76u_vendor_request() [all …]
|
H A D | sdio.c | 1 // SPDX-License-Identifier: ISC 25 return sdio_readl(dev->sdio.func, MCR_WHISR, NULL); in mt76s_read_whisr() 30 struct mt76_sdio *sdio = &dev->sdio; in mt76s_read_pcr() 32 return sdio_readl(sdio->func, MCR_WHLPCR, NULL); in mt76s_read_pcr() 38 struct sdio_func *func = dev->sdio.func; in mt76s_read_mailbox() 46 dev_err(dev->dev, "failed setting address [err=%d]\n", err); in mt76s_read_mailbox() 52 dev_err(dev->dev, "failed setting read mode [err=%d]\n", err); in mt76s_read_mailbox() 59 dev_err(dev->dev, "query whisr timeout\n"); in mt76s_read_mailbox() 65 dev_err(dev->dev, "failed setting read mode [err=%d]\n", err); in mt76s_read_mailbox() 71 dev_err(dev->dev, "failed reading h2dsm0r [err=%d]\n", err); in mt76s_read_mailbox() [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() 42 * or -1 on failure. 52 bqueue_init(bqueue_t *q, uint_t fill_fraction, size_t size, size_t node_offset) in bqueue_init() argument 55 return (-1); in bqueue_init() 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() [all …]
|
/freebsd/sys/netgraph/bluetooth/include/ |
H A D | ng_bluetooth.h | 5 /*- 6 * SPDX-License-Identifier: BSD-2-Clause 8 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 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 [all …]
|
/freebsd/contrib/bearssl/src/symcipher/ |
H A D | aes_ct_ctrcbc.c | 32 ctx->vtable = &br_aes_ct_ctrcbc_vtable; in br_aes_ct_ctrcbc_init() 33 ctx->num_rounds = br_aes_ct_keysched(ctx->skey, key, len); in br_aes_ct_ctrcbc_init() 44 while (len -- > 0) { in xorbuf() 59 br_aes_ct_skey_expand(sk_exp, ctx->num_rounds, ctx->skey); in br_aes_ct_ctrcbc_ctr() 62 * We keep the counter as four 32-bit values, with big-endian in br_aes_ct_ctrcbc_ctr() 74 uint32_t q[8], carry; in br_aes_ct_ctrcbc_ctr() local 79 * little-endian convention, so we have to byteswap them. in br_aes_ct_ctrcbc_ctr() 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() [all …]
|
H A D | aes_ct_dec.c | 29 br_aes_ct_bitslice_invSbox(uint32_t *q) in br_aes_ct_bitslice_invSbox() argument 32 * AES S-box is: in br_aes_ct_bitslice_invSbox() 36 * Since inversion is an involution, the inverse S-box can be in br_aes_ct_bitslice_invSbox() 37 * computed from the S-box as: in br_aes_ct_bitslice_invSbox() 42 * Note: we reuse the implementation of the forward S-box, in br_aes_ct_bitslice_invSbox() 44 * lower. By merging the B() transforms into the S-box circuit in br_aes_ct_bitslice_invSbox() 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() [all …]
|
H A D | aes_ct64_dec.c | 29 br_aes_ct64_bitslice_invSbox(uint64_t *q) in br_aes_ct64_bitslice_invSbox() argument 33 * to 64-bit registers. in br_aes_ct64_bitslice_invSbox() 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() [all …]
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_mbq.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (C) 2013-2014 Vincenzo Maffione 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 [all …]
|
/freebsd/sys/net/altq/ |
H A D | altq_classq.h | 1 /*- 2 * Copyright (c) 1991-1997 Regents of the University of California. 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 [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/usr.sbin/ypserv/ |
H A D | yp_dnslookup.c | 1 /*- 2 * SPDX-License-Identifier: BSD-4-Clause 78 if (inet_ntop(hp->h_addrtype, hp->h_addr, addr, sizeof(addr)) == NULL) in parse() 81 len = strlen(addr) + 1 + strlen(hp->h_name); in parse() 82 for (i = 0; hp->h_aliases[i]; i++) in parse() 83 len += strlen(hp->h_aliases[i]) + 1; in parse() 90 snprintf(result, sizeof(result), "%s %s", addr, hp->h_name); in parse() 91 for (i = 0; hp->h_aliases[i]; i++) { in parse() 93 strcat(result, hp->h_aliases[i]); in parse() 132 if (!(_res.options & RES_INIT) && res_init() == -1) { in yp_init_resolver() [all …]
|
/freebsd/contrib/unbound/libunbound/ |
H A D | context.c | 2 * libunbound/context.c - validating context for unbound internal use 63 struct config_file* cfg = ctx->env->cfg; in context_finalize() 64 verbosity = cfg->verbosity; in context_finalize() 65 if(ctx_logfile_overridden && !ctx->logfile_override) { in context_finalize() 69 if(ctx->logfile_override) { in context_finalize() 71 log_file(ctx->log_out); in context_finalize() 73 log_init(cfg->logfile, cfg->use_syslog, NULL); in context_finalize() 75 ctx->pipe_pid = getpid(); in context_finalize() 78 if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env)) in context_finalize() 80 if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env)) in context_finalize() [all …]
|
/freebsd/crypto/heimdal/lib/asn1/ |
H A D | der_cmp.c | 2 * Copyright (c) 2003-2005 Kungliga Tekniska Högskolan 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() 41 return memcmp(p->components, in der_heim_oid_cmp() 42 q->components, in der_heim_oid_cmp() 43 p->length * sizeof(*p->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() [all …]
|
/freebsd/sys/dev/ath/ath_hal/ar5211/ |
H A D | ar5211_xmit.c | 1 /*- 2 * SPDX-License-Identifier: ISC 4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 5 * Copyright (c) 2002-2006 Atheros Communications, Inc. 45 * is called from both ISR and non-ISR contexts. in ar5211UpdateTxTrigLevel() 53 ((MAX_TX_FIFO_THRESHOLD - curTrigLevel) / 2); in ar5211UpdateTxTrigLevel() 58 curTrigLevel--; in ar5211UpdateTxTrigLevel() 61 /* re-enable chip interrupts */ in ar5211UpdateTxTrigLevel() 69 /* re-enable chip interrupts */ in ar5211UpdateTxTrigLevel() 80 ar5211SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo) in ar5211SetTxQueueProps() argument [all …]
|
/freebsd/crypto/openssl/test/recipes/04-test_pem_reading_data/ |
H A D | cert-onecolumn.pem | 1 -----BEGIN CERTIFICATE----- 12 Q 15 Q 33 q 43 Q 180 Q 264 Q 301 Q 339 Q 340 Q [all …]
|
H A D | dsa-onecolumn.pem | 1 -----BEGIN DSA PRIVATE KEY----- 2 Proc-Type: 4,ENCRYPTED 3 DEK-Info: AES-256-CBC,A2A7FA3E5E454B59C8777564E7AF3CD6 11 Q 17 Q 42 q 75 q 83 Q 98 q 100 Q [all …]
|
/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_write_format_zip_compression_store.c | 1 /*- 51 /* This is a drop-in replacement for crc32() from zlib. in bitcrc32() 65 for (; s > 0; --s) { in bitcrc32() 67 for (bitctr = 8; bitctr > 0; --bitctr) { in bitcrc32() 109 /* Quick and dirty: Read 2-byte and 4-byte integers from Zip file. */ 135 * q walks over the local headers, the data and the data descriptors. */ in verify_uncompressed_contents() 136 const char *p, *q, *local_heade in verify_uncompressed_contents() 137 const char *p, *q, *local_header, *extra_start; verify_uncompressed_contents() local [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() 56 c -= '0'; in stresc2chr() 60 c = c * 8 + *p++ - '0'; in stresc2chr() 63 c = c * 8 + *p - '0'; in stresc2chr() 65 p--; in stresc2chr() 67 p--; in stresc2chr() 69 *q++ = c; in stresc2chr() 73 *q++ = '\a'; in stresc2chr() 76 *q++ = '\b'; in stresc2chr() [all …]
|
/freebsd/sys/netpfil/ipfw/ |
H A D | dn_sched_qfq.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 60 static void dump_sched(struct qfq_sched *q, const char *msg); 73 * We use the base-0 version __fls() to match the description in 89 return fls(word) - 1; in __fls() 125 /*-------------------------------------------*/ 140 ^.__grp->index = 0 141 *.__grp->slot_shift 158 The per-scheduler-instance data contain all the data structures 169 * Shifts used for class<->group mapping. Class weights are [all …]
|
/freebsd/lib/msun/tests/ |
H A D | rem_test.c | 1 /*- 2 * Copyright (c) 2005-2008 David Schultz <das@FreeBSD.org> 39 #include "test-utils.h" 59 test_invalid(-INFINITY, 1.0); in ATF_TC_BODY() 65 testd(0x1p-1074, 1, 0x1p-1074, 0); in ATF_TC_BODY() 66 testf(0x1p-149, 1, 0x1p-149, 0); in ATF_TC_BODY() 67 test(3.0, 4, -1, 1); in ATF_TC_BODY() 68 test(3.0, -4, -1, -1); in ATF_TC_BODY() 70 test(4.5 * 7.5, 4.5, -2.25, 8); /* we should get the even one */ in ATF_TC_BODY() 71 testf(0x1.9044f6p-1, 0x1.ce662ep-1, -0x1.f109cp-4, 1); in ATF_TC_BODY() [all …]
|
/freebsd/sys/contrib/dev/ath/ath_hal/ar9300/ |
H A D | ar9300_xmit.c | 46 if (AH9300(ah)->ah_tx_trig_level >= MAX_TX_FIFO_THRESHOLD && in ar9300_update_tx_trig_level() 55 omask = ar9300_set_interrupts(ah, ahp->ah_mask_reg &~ HAL_INT_GLOBAL, 0); in ar9300_update_tx_trig_level() 66 new_level--; in ar9300_update_tx_trig_level() 75 /* re-enable chip interrupts */ in ar9300_update_tx_trig_level() 78 AH9300(ah)->ah_tx_trig_level = new_level; in ar9300_update_tx_trig_level() 89 return (AH9300(ah)->ah_tx_trig_level); in ar9300_get_tx_trig_level() 97 ar9300_set_tx_queue_props(struct ath_hal *ah, int q, const HAL_TXQ_INFO *q_info) in ar9300_set_tx_queue_props() argument 100 HAL_CAPABILITIES *p_cap = &AH_PRIVATE(ah)->ah_caps; in ar9300_set_tx_queue_props() 102 if (q >= p_cap->halTotalQueues) { in ar9300_set_tx_queue_props() 103 HALDEBUG(ah, HAL_DEBUG_QUEUE, "%s: invalid queue num %u\n", __func__, q); in ar9300_set_tx_queue_props() [all …]
|