| /freebsd-9-stable/contrib/libc++/src/ |
| D | hash.cpp | 209 const std::size_t q = n / p; in __next_prime() local 210 if (q < p) in __next_prime() 212 if (n == q * p) in __next_prime() 220 std::size_t q = n / i; in __next_prime() local 221 if (q < i) in __next_prime() 223 if (n == q * i) in __next_prime() 227 q = n / i; in __next_prime() 228 if (q < i) in __next_prime() 230 if (n == q * i) in __next_prime() 234 q = n / i; in __next_prime() [all …]
|
| /freebsd-9-stable/sys/netgraph/bluetooth/include/ |
| D | ng_bluetooth.h | 75 #define NG_BT_MBUFQ_INIT(q, _maxlen) \ argument 77 (q)->head = NULL; \ 78 (q)->tail = NULL; \ 79 (q)->len = 0; \ 80 (q)->maxlen = (_maxlen); \ 81 (q)->drops = 0; \ 84 #define NG_BT_MBUFQ_DESTROY(q) \ argument 86 NG_BT_MBUFQ_DRAIN((q)); \ 89 #define NG_BT_MBUFQ_FIRST(q) (q)->head argument 91 #define NG_BT_MBUFQ_LEN(q) (q)->len argument [all …]
|
| /freebsd-9-stable/sys/dev/netmap/ |
| D | netmap_mbq.c | 44 static inline void __mbq_init(struct mbq *q) in __mbq_init() argument 46 q->head = q->tail = NULL; in __mbq_init() 47 q->count = 0; in __mbq_init() 51 void mbq_safe_init(struct mbq *q) in mbq_safe_init() argument 53 mtx_init(&q->lock, "mbq", NULL, MTX_SPIN); in mbq_safe_init() 54 __mbq_init(q); in mbq_safe_init() 58 void mbq_init(struct mbq *q) in mbq_init() argument 60 __mbq_init(q); in mbq_init() 64 static inline void __mbq_enqueue(struct mbq *q, struct mbuf *m) in __mbq_enqueue() argument 67 if (q->tail) { in __mbq_enqueue() [all …]
|
| /freebsd-9-stable/cddl/contrib/opensolaris/lib/libdtrace/common/ |
| 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-9-stable/usr.sbin/ypserv/ |
| D | yp_dnslookup.c | 150 register struct circleq_dnsentry *q; in yp_malloc_dnsent() local 152 q = (struct circleq_dnsentry *)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-9-stable/contrib/ntp/tests/ntpd/ |
| D | ntp_prio_q.c | 47 queue* q = create_queue(); in test_EmptyQueue() local 49 TEST_ASSERT_NOT_NULL(q); in test_EmptyQueue() 50 TEST_ASSERT_TRUE(empty(q)); in test_EmptyQueue() 51 TEST_ASSERT_NULL(queue_head(q)); in test_EmptyQueue() 52 TEST_ASSERT_NULL(dequeue(q)); in test_EmptyQueue() 53 TEST_ASSERT_EQUAL(0, get_no_of_elements(q)); in test_EmptyQueue() 55 destroy_queue(q); in test_EmptyQueue() 61 queue* q = create_queue(); in test_OneElementQueue() local 63 TEST_ASSERT_NOT_NULL(q); in test_OneElementQueue() 67 enqueue(q, e_ptr); in test_OneElementQueue() [all …]
|
| /freebsd-9-stable/sbin/pfctl/missing/altq/ |
| D | altq_classq.h | 64 #define qtype(q) (q)->qtype_ /* Get queue type */ argument 65 #define qlimit(q) (q)->qlim_ /* Max packets to be queued */ argument 66 #define qlen(q) (q)->qlen_ /* Current queue length. */ argument 67 #define qtail(q) (q)->tail_ /* Tail of the queue */ argument 68 #define qhead(q) ((q)->tail_ ? (q)->tail_->m_nextpkt : NULL) argument 70 #define qempty(q) ((q)->qlen_ == 0) /* Is the queue empty?? */ argument 71 #define q_is_red(q) ((q)->qtype_ == Q_RED) /* Is the queue a red queue */ argument 72 #define q_is_rio(q) ((q)->qtype_ == Q_RIO) /* Is the queue a rio queue */ argument 73 #define q_is_red_or_rio(q) ((q)->qtype_ == Q_RED || (q)->qtype_ == Q_RIO) argument 89 _addq(class_queue_t *q, struct mbuf *m) in _addq() argument [all …]
|
| /freebsd-9-stable/sys/contrib/altq/altq/ |
| D | altq_classq.h | 67 #define qtype(q) (q)->qtype_ /* Get queue type */ argument 68 #define qlimit(q) (q)->qlim_ /* Max packets to be queued */ argument 69 #define qlen(q) (q)->qlen_ /* Current queue length. */ argument 70 #define qtail(q) (q)->tail_ /* Tail of the queue */ argument 71 #define qhead(q) ((q)->tail_ ? (q)->tail_->m_nextpkt : NULL) argument 73 #define qempty(q) ((q)->qlen_ == 0) /* Is the queue empty?? */ argument 74 #define q_is_red(q) ((q)->qtype_ == Q_RED) /* Is the queue a red queue */ argument 75 #define q_is_rio(q) ((q)->qtype_ == Q_RIO) /* Is the queue a rio queue */ argument 76 #define q_is_red_or_rio(q) ((q)->qtype_ == Q_RED || (q)->qtype_ == Q_RIO) argument 92 _addq(class_queue_t *q, struct mbuf *m) in _addq() argument [all …]
|
| /freebsd-9-stable/contrib/libarchive/tar/test/ |
| D | test_version.c | 35 char *p, *q; in DEFINE_TEST() local 51 q = p = slurpfile(&s, "version.stdout"); in DEFINE_TEST() 55 if (!assertEqualMem(q, "bsdtar ", 7)) in DEFINE_TEST() 57 q += 7; s -= 7; in DEFINE_TEST() 59 while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { in DEFINE_TEST() 60 ++q; in DEFINE_TEST() 67 if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') in DEFINE_TEST() 68 ++q; in DEFINE_TEST() 70 assert(*q == ' '); in DEFINE_TEST() 71 ++q; --s; in DEFINE_TEST() [all …]
|
| /freebsd-9-stable/contrib/libarchive/cpio/test/ |
| D | test_option_version.c | 35 const char *q = p; in verify() local 42 if (!assertEqualMem(q, "bsdcpio ", 8)) in verify() 45 q += 8; s -= 8; in verify() 47 while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { in verify() 48 ++q; in verify() 55 if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') in verify() 56 ++q; in verify() 58 assert(*q == ' '); in verify() 59 ++q; --s; in verify() 62 assertEqualMem(q, "-- ", 3); in verify() [all …]
|
| /freebsd-9-stable/tools/regression/lib/msun/ |
| D | test-rem.c | 105 int q; in test_invalid() local 107 q = 0xdeadbeef; in test_invalid() 110 assert(isnan(remquo(x, y, &q))); in test_invalid() 112 assert(q == 0xdeadbeef); in test_invalid() 116 assert(isnan(remquof(x, y, &q))); in test_invalid() 118 assert(q == 0xdeadbeef); in test_invalid() 122 assert(isnan(remquol(x, y, &q))); in test_invalid() 124 assert(q == 0xdeadbeef); in test_invalid() 138 int q; in testl() local 140 q = random(); in testl() [all …]
|
| /freebsd-9-stable/contrib/sendmail/src/ |
| 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-9-stable/contrib/libarchive/libarchive/test/ |
| D | test_write_format_zip_no_compression.c | 74 const char *p, *q; in DEFINE_TEST() local 199 q = buff; in DEFINE_TEST() 200 assertEqualMem(q, "PK\003\004", 4); /* Signature */ in DEFINE_TEST() 201 assertEqualInt(i2(q + 4), 20); /* Version needed to extract */ in DEFINE_TEST() 202 assertEqualInt(i2(q + 6), 8); /* Flags */ in DEFINE_TEST() 203 assertEqualInt(i2(q + 8), 0); /* Compression method */ in DEFINE_TEST() 204 …assertEqualInt(i2(q + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File t… in DEFINE_TEST() 205 …assertEqualInt(i2(q + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /*… in DEFINE_TEST() 206 assertEqualInt(i4(q + 14), 0); /* CRC-32 */ in DEFINE_TEST() 207 assertEqualInt(i4(q + 18), sizeof(file_data1) + sizeof(file_data2)); /* Compressed size */ in DEFINE_TEST() [all …]
|
| /freebsd-9-stable/usr.sbin/pw/ |
| D | pw_conf.c | 212 char *q = NULL; in newstr() local 217 if ((q = malloc(l)) != NULL) in newstr() 218 memcpy(q, p, l); in newstr() 220 return q; in newstr() 260 char *q = strtok(NULL, toks); in read_userconfig() local 268 printf("Got unknown kwd `%s' val=`%s'\n", p, q ? q : ""); in read_userconfig() 270 printf("Got kwd[%s]=%s\n", p, q); in read_userconfig() 274 config.default_password = boolean_val(q, 1); in read_userconfig() 277 config.reuse_uids = boolean_val(q, 0); in read_userconfig() 280 config.reuse_gids = boolean_val(q, 0); in read_userconfig() [all …]
|
| /freebsd-9-stable/sys/dev/ath/ath_hal/ar5211/ |
| 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 …]
|
| /freebsd-9-stable/crypto/heimdal/lib/asn1/ |
| 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_bit_string *q) in der_heim_bit_string_cmp() argument 60 if (p->length != q->length) in der_heim_bit_string_cmp() [all …]
|
| /freebsd-9-stable/sys/netpfil/ipfw/ |
| D | dn_sched_qfq.c | 52 static void dump_sched(struct qfq_sched *q, const char *msg); 252 static inline struct qfq_group *qfq_ffs(struct qfq_sched *q, in qfq_ffs() argument 256 return &q->groups[index]; in qfq_ffs() 293 struct qfq_sched *q = (struct qfq_sched *)(_q->_si + 1); in qfq_new_queue() local 309 if (q->wsum + w > QFQ_MAX_WSUM) in qfq_new_queue() 313 cl->grp = &q->groups[i]; in qfq_new_queue() 314 q->wsum += w; in qfq_new_queue() 324 struct qfq_sched *q = (struct qfq_sched *)(_q->_si + 1); in qfq_free_queue() local 327 q->wsum -= ONE_FP/cl->inv_w; in qfq_free_queue() 346 qfq_calc_state(struct qfq_sched *q, struct qfq_group *grp) in qfq_calc_state() argument [all …]
|
| D | ip_fw_dynamic.c | 320 ipfw_dyn_rule *prev, *q = NULL; in lookup_dyn_rule_locked() local 324 for (prev = NULL, q = V_ipfw_dyn_v[i].head; q; prev = q, q = q->next) { in lookup_dyn_rule_locked() 325 if (q->dyn_type == O_LIMIT_PARENT && q->count) in lookup_dyn_rule_locked() 328 if (pkt->proto != q->id.proto || q->dyn_type == O_LIMIT_PARENT) in lookup_dyn_rule_locked() 332 if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.src_ip6) && in lookup_dyn_rule_locked() 333 IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.dst_ip6) && in lookup_dyn_rule_locked() 334 pkt->src_port == q->id.src_port && in lookup_dyn_rule_locked() 335 pkt->dst_port == q->id.dst_port) { in lookup_dyn_rule_locked() 339 if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.dst_ip6) && in lookup_dyn_rule_locked() 340 IN6_ARE_ADDR_EQUAL(&pkt->dst_ip6, &q->id.src_ip6) && in lookup_dyn_rule_locked() [all …]
|
| D | dn_sched_rr.c | 53 struct dn_queue q; /* Standard queue */ member 76 rr_append(struct rr_queue *q, struct rr_si *si) in rr_append() argument 78 q->status = 1; /* mark as in-rr_list */ in rr_append() 79 q->credit = q->quantum; /* initialize credit */ in rr_append() 83 si->head = q; in rr_append() 85 si->tail->qnext = q; in rr_append() 86 si->tail = q; /* advance the tail pointer */ in rr_append() 87 q->qnext = si->head; /* make it circular */ in rr_append() 111 remove_queue_q(struct rr_queue *q, struct rr_si *si) in remove_queue_q() argument 115 if (q->status != 1) in remove_queue_q() [all …]
|
| /freebsd-9-stable/gnu/usr.bin/rcs/ |
| D | rcstest | 63 -v) q=; set -x;; 64 '') q=-q;; 86 rcs -i -L -ta.11 $q a.c && 96 ci -ta.11 -mm $q a.c && 98 rcs -L $q a.c || { echo "#ci+rcs -L failed"; exit 1; } 102 co $l $q a.c && 108 ci -mm $q a.c && 109 co $q a.c && 113 co -r1.1 $q a.c && 118 ci -r1.1.1 -mm $q a.c && [all …]
|
| /freebsd-9-stable/contrib/ntp/libparse/ |
| D | parsesolaris.c | 284 queue_t *q, in setup_stream() argument 290 pprintf(DD_OPEN,"parse: SETUP_STREAM - setting up stream for q=%x\n", q); in setup_stream() 303 if (!q) in setup_stream() 305 putnext(q, mp); in setup_stream() 306 return putctl1(WR(q)->q_next, M_CTL, (mode == M_PARSE) ? MC_SERVICEIMM : in setup_stream() 319 queue_t *q, in parseopen() argument 329 pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q); in parseopen() 337 if (q->q_ptr != (caddr_t)NULL) in parseopen() 343 q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t), KM_SLEEP); in parseopen() 344 if (q->q_ptr == (caddr_t)0) in parseopen() [all …]
|
| /freebsd-9-stable/sys/dev/ath/ath_hal/ar5210/ |
| D | ar5210_xmit.c | 36 ar5210SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo) in ar5210SetTxQueueProps() argument 40 if (q >= HAL_NUM_TX_QUEUES) { in ar5210SetTxQueueProps() 42 __func__, q); in ar5210SetTxQueueProps() 45 return ath_hal_setTxQProps(ah, &ahp->ah_txq[q], qInfo); in ar5210SetTxQueueProps() 52 ar5210GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo) in ar5210GetTxQueueProps() argument 56 if (q >= HAL_NUM_TX_QUEUES) { in ar5210GetTxQueueProps() 58 __func__, q); in ar5210GetTxQueueProps() 61 return ath_hal_getTxQProps(ah, qInfo, &ahp->ah_txq[q]); in ar5210GetTxQueueProps() 73 int q; in ar5210SetupTxQueue() local 77 q = 2; in ar5210SetupTxQueue() [all …]
|
| /freebsd-9-stable/contrib/ofed/management/opensm/opensm/ |
| D | osm_prtn_config.c | 238 #define STRIP_TAIL_SPACES(p) { char *q = (p) + strlen(p); \ 239 while ( q != (p) && ( *q == '\0' || \ 240 *q == ' ' || *q == '\t' || \ 241 *q == '\n')) { *q-- = '\0'; }; } 246 char *p, *q; in parse_name_token() local 255 q = strchr(p, '='); in parse_name_token() 256 if (q) in parse_name_token() 257 *q++ = '\0'; in parse_name_token() 260 str = q; in parse_name_token() 262 q = p + strlen(p); in parse_name_token() [all …]
|
| D | osm_ucast_file.c | 153 char *p, *q; in do_ucast_file_load() local 173 q = strstr(p, " guid 0x"); in do_ucast_file_load() 174 if (!q) { in do_ucast_file_load() 181 p = q + 8; in do_ucast_file_load() 182 sw_guid = strtoull(p, &q, 16); in do_ucast_file_load() 183 if (q == p || !isspace(*q)) { in do_ucast_file_load() 203 lid = (uint16_t) strtoul(p, &q, 16); in do_ucast_file_load() 204 if (q == p || !isspace(*q)) { in do_ucast_file_load() 211 p = q; in do_ucast_file_load() 214 port_num = (uint8_t) strtoul(p, &q, 10); in do_ucast_file_load() [all …]
|
| /freebsd-9-stable/sys/dev/fatm/ |
| D | if_fatm.c | 147 fatm_utopia_writeregs_complete(struct fatm_softc *sc, struct cmdqueue *q) in fatm_utopia_writeregs_complete() argument 150 H_SYNCSTAT_POSTREAD(sc, q->q.statp); in fatm_utopia_writeregs_complete() 151 if(H_GETSTAT(q->q.statp) & FATM_STAT_ERROR) { in fatm_utopia_writeregs_complete() 153 q->error = EIO; in fatm_utopia_writeregs_complete() 155 wakeup(q); in fatm_utopia_writeregs_complete() 169 struct cmdqueue *q; in fatm_utopia_writereg() local 178 q = GET_QUEUE(sc->cmdqueue, struct cmdqueue, sc->cmdqueue.head); in fatm_utopia_writereg() 180 H_SYNCSTAT_POSTREAD(sc, q->q.statp); in fatm_utopia_writereg() 181 if (!(H_GETSTAT(q->q.statp) & FATM_STAT_FREE)) { in fatm_utopia_writereg() 187 q->error = 0; in fatm_utopia_writereg() [all …]
|