/freebsd-11-stable/tests/sys/mqueue/ |
H A D | mqtest3.c | 33 mqd_t mq; local 42 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); 43 if (mq == (mqd_t)-1) 45 status = mq_getattr(mq, &attr); 55 mq_close(mq); 59 mq = mq_open(MQNAME, O_RDWR); 60 if (mq == (mqd_t)-1) 65 FD_SET(mq_getfd_np(mq), &set); 67 status = select(mq_getfd_np(mq) + 1, &set, NULL, 71 status = mq_receive(mq, bu [all...] |
H A D | mqtest2.c | 30 mqd_t mq; local 40 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); 41 if (mq == (mqd_t)-1) 43 status = mq_getattr(mq, &attr); 52 mq_close(mq); 56 mq = mq_open(MQNAME, O_RDWR); 57 if (mq == (mqd_t)-1) 62 status = mq_receive(mq, buf, attr.mq_msgsize, &prio); 74 mq_close(mq); 88 status = mq_send(mq, bu [all...] |
H A D | mqtest1.c | 19 mqd_t mq; local 26 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); 27 if (mq == (mqd_t)-1) 32 status = mq_getattr(mq, &attr2); 42 status = mq_notify(mq, &sigev); 45 status = mq_notify(mq, &sigev); 50 status = mq_notify(mq, NULL); 53 status = mq_close(mq);
|
H A D | mqtest4.c | 33 mqd_t mq; local 43 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); 44 if (mq == (mqd_t) -1) 46 status = mq_getattr(mq, &attr); 55 mq_close(mq); 57 mq = mq_open(MQNAME, O_RDWR); 58 if (mq == (mqd_t)-1) 60 EV_SET(&kev, mq_getfd_np(mq), EVFILT_READ, EV_ADD, 0, 0, 0); 70 status = mq_receive(mq, buf, attr.mq_msgsize, &prio); 82 mq_close(mq); [all...] |
H A D | mqtest5.c | 36 mqd_t mq; local 53 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); 54 if (mq == (mqd_t)-1) 56 status = mq_getattr(mq, &attr); 71 mq_close(mq); 72 mq = mq_open(MQNAME, O_RDWR | O_NONBLOCK); 73 if (mq == (mqd_t)-1) 78 status = mq_notify(mq, &sigev); 86 status = mq_receive(mq, buf, attr.mq_msgsize, &prio); 98 mq_close(mq); [all...] |
/freebsd-11-stable/sys/kern/ |
H A D | uipc_mqueue.c | 248 static void mqueue_free(struct mqueue *mq); 249 static int mqueue_send(struct mqueue *mq, const char *msg_ptr, 252 static int mqueue_receive(struct mqueue *mq, char *msg_ptr, 255 static int _mqueue_send(struct mqueue *mq, struct mqueue_msg *msg, 257 static int _mqueue_recv(struct mqueue *mq, struct mqueue_msg **msg, 259 static void mqueue_send_notification(struct mqueue *mq); 981 struct mqueue *mq; local 987 mq = mqueue_alloc(NULL); 988 if (mq == NULL) 1006 pn->mn_data = mq; 1338 struct mqueue *mq; local 1589 struct mqueue *mq; local 1613 mqueue_free(struct mqueue *mq) argument 1685 mqueue_send(struct mqueue *mq, const char *msg_ptr, size_t msg_len, unsigned msg_prio, int waitok, const struct timespec *abs_timeout) argument 1754 _mqueue_send(struct mqueue *mq, struct mqueue_msg *msg, int timo) argument 1810 mqueue_send_notification(struct mqueue *mq) argument 1841 mqueue_receive(struct mqueue *mq, char *msg_ptr, size_t msg_len, unsigned *msg_prio, int waitok, const struct timespec *abs_timeout) argument 1912 _mqueue_recv(struct mqueue *mq, struct mqueue_msg **msg, int timo) argument 1988 notifier_remove(struct proc *p, struct mqueue *mq, int fd) argument 2012 struct mqueue *mq; local 2208 struct mqueue *mq; local 2257 struct mqueue *mq; local 2284 struct mqueue *mq; local 2315 struct mqueue *mq; local 2434 struct mqueue *mq; local 2462 struct mqueue *mq; local 2484 struct mqueue *mq = FPTOMQ(fp); local 2589 struct mqueue *mq = FPTOMQ(fp); local 2606 struct mqueue *mq = FPTOMQ(kn->kn_fp); local 2619 struct mqueue *mq = FPTOMQ(kn->kn_fp); local 2628 struct mqueue *mq = FPTOMQ(kn->kn_fp); local 2778 struct mqueue *mq; local 2809 struct mqueue *mq; local [all...] |
/freebsd-11-stable/contrib/unbound/dnstap/ |
H A D | dtstream.h | 253 * @param mq: message queue. 255 void dt_msg_queue_delete(struct dt_msg_queue* mq); 261 * @param mq: message queue. 269 void dt_msg_queue_submit(struct dt_msg_queue* mq, void* buf, size_t len); 300 * @param mq: message queue to register. 304 struct dt_msg_queue* mq); 309 * @param mq: message queue. 312 struct dt_msg_queue* mq);
|
H A D | dtstream.c | 106 struct dt_msg_queue* mq = calloc(1, sizeof(*mq)); local 107 if(!mq) return NULL; 108 mq->maxsize = 1*1024*1024; /* set max size of buffer, per worker, 111 mq->wakeup_timer = comm_timer_create(base, mq_wakeup_cb, mq); 112 if(!mq->wakeup_timer) { 113 free(mq); 116 lock_basic_init(&mq->lock); 117 lock_protect(&mq 123 dt_msg_queue_clear(struct dt_msg_queue* mq) argument 139 dt_msg_queue_delete(struct dt_msg_queue* mq) argument 178 struct dt_msg_queue* mq = (struct dt_msg_queue*)arg; local 191 dt_msg_queue_start_timer(struct dt_msg_queue* mq) argument 223 dt_msg_queue_submit(struct dt_msg_queue* mq, void* buf, size_t len) argument 443 dt_io_thread_register_queue(struct dt_io_thread* dtio, struct dt_msg_queue* mq) argument 458 dt_io_thread_unregister_queue(struct dt_io_thread* dtio, struct dt_msg_queue* mq) argument 484 dt_msg_queue_pop(struct dt_msg_queue* mq, void** buf, size_t* len) argument 506 dtio_find_in_queue(struct dt_io_thread* dtio, struct dt_msg_queue* mq) argument [all...] |
/freebsd-11-stable/sys/netpfil/ipfw/test/ |
H A D | test_dn_sched.c | 40 if (q->mq.head) 41 dn_free_pkts(q->mq.head); 61 mq_append(&q->mq, m);
|
H A D | main.c | 138 * allocate a mq right after si 143 struct mq *mq = (struct mq *)si; local 147 if (mq->head == NULL) 148 mq->head = m; 150 mq->tail->m_nextpkt = m; 151 mq->tail = m; 159 struct mq *mq local [all...] |
H A D | dn_test.h | 170 mq_append(struct mq *q, struct mbuf *m)
|
/freebsd-11-stable/sys/netpfil/ipfw/ |
H A D | dn_sched.h | 81 * should internally check for (m != q->mq.head) 169 struct mbuf *m = q->mq.head; 177 q->mq.head = m->m_nextpkt; 178 q->mq.count--;
|
H A D | dn_sched_fq_codel.h | 62 struct mq mq; /* list of packets */ member in struct:fq_codel_flow 141 struct mbuf *m = q->mq.head; 145 q->mq.head = m->m_nextpkt;
|
H A D | dn_sched_prio.c | 131 if (q->mq.head == NULL) { 169 if (q->mq.head == NULL) 181 * can simply append q->mq.head to q2->... 184 oldq->mq.tail->m_nextpkt = q->mq.head; 185 oldq->mq.tail = q->mq.tail; 190 q->mq.tail = q->mq.head = NULL;
|
H A D | ip_dn_private.h | 88 struct mq { /* a basic queue of packets*/ struct 164 struct mq pending; 194 struct mq mq; member in struct:delay_line 258 struct mq mq; /* packets queue */ member in struct:dn_queue 442 mq_append(struct mq *q, struct mbuf *m)
|
H A D | dn_sched_wf2q.c | 142 if (m != q->mq.head) { 145 if (m != q->mq.head) /* queue was already busy */ 247 if (q->mq.head == 0) { /* not backlogged any more. */ 251 uint64_t len = q->mq.head->m_pkthdr.len; 310 if (_q->mq.head != NULL) { 311 wf2qp_enqueue(_q->_si, _q, _q->mq.head); 337 if (q->mq.head == NULL) {
|
H A D | dn_sched_rr.c | 156 if (m != q->mq.head) { 159 if (m != q->mq.head) 185 struct mbuf *m = rrq->q.mq.head; 273 if (_q->mq.head != NULL) {
|
H A D | ip_dn_io.c | 264 mq_append(struct mq *q, struct mbuf *m) 528 mq_append(&q->mq, m); 549 transmit_event(struct mq *q, struct delay_line *dline, uint64_t now) 555 while ((m = dline->mq.head) != NULL) { 559 dline->mq.head = m->m_nextpkt; 560 dline->mq.count--; 598 serve_sched(struct mq *q, struct dn_sch_inst *si, uint64_t now) 600 struct mq def_q; 603 int delay_line_idle = (si->dline.mq.head == NULL); 629 mq_append(&si->dline.mq, [all...] |
H A D | dn_aqm_codel.c | 192 struct mbuf *m = q->mq.head; 196 q->mq.head = m->m_nextpkt; 264 mq_append(&q->mq, m);
|
/freebsd-11-stable/sys/dev/oce/ |
H A D | oce_queue.c | 67 static void oce_mq_free(struct oce_mq *mq); 148 sc->mq = oce_mq_create(sc, sc->eq[0], 64); 149 if (!sc->mq) 191 if (sc->mq) 192 oce_mq_free(sc->mq); 672 struct oce_mq *mq = NULL; local 685 /* allocate the mq */ 686 mq = malloc(sizeof(struct oce_mq), M_DEVBUF, M_NOWAIT | M_ZERO); 687 if (!mq) { 692 mq 778 oce_mq_free(struct oce_mq *mq) argument 998 oce_start_mq(struct oce_mq *mq) argument [all...] |
/freebsd-11-stable/lib/librt/ |
H A D | mq.c | 26 * $FreeBSD: stable/11/lib/librt/mq.c 306905 2016-10-09 12:34:56Z kib $ 86 struct __mq *mq; local 89 mq = malloc(sizeof(struct __mq)); 90 if (mq == NULL) 93 mq->oshandle = __sys_kmq_open(name, oflag, mode, attr); 94 if (mq->oshandle != -1) { 95 mq->node = NULL; 96 return (mq); 99 free(mq);
|
H A D | Makefile | 17 SRCS+= aio.c mq.c sigev_thread.c timer.c
|
/freebsd-11-stable/sys/sys/ |
H A D | mbuf.h | 1226 mbufq_init(struct mbufq *mq, int maxlen) argument 1229 STAILQ_INIT(&mq->mq_head); 1230 mq->mq_maxlen = maxlen; 1231 mq->mq_len = 0; 1235 mbufq_flush(struct mbufq *mq) argument 1239 m = STAILQ_FIRST(&mq->mq_head); 1240 STAILQ_INIT(&mq->mq_head); 1241 mq->mq_len = 0; 1246 mbufq_drain(struct mbufq *mq) argument 1250 n = mbufq_flush(mq); 1258 mbufq_first(const struct mbufq *mq) argument 1265 mbufq_last(const struct mbufq *mq) argument 1272 mbufq_full(const struct mbufq *mq) argument 1279 mbufq_len(const struct mbufq *mq) argument 1286 mbufq_enqueue(struct mbufq *mq, struct mbuf *m) argument 1297 mbufq_dequeue(struct mbufq *mq) argument 1311 mbufq_prepend(struct mbufq *mq, struct mbuf *m) argument [all...] |
/freebsd-11-stable/sys/dev/ocs_fc/ |
H A D | ocs_hw_queues.c | 74 hw_mq_t *mq = NULL; local 252 mq = hw_new_mq(cq, len); 253 if (mq == NULL) { 500 hw_mq_t *mq = ocs_malloc(hw->os, sizeof(*mq), OCS_M_ZERO | OCS_M_NOWAIT); local 502 if (mq != NULL) { 503 mq->cq = cq; 504 mq->type = SLI_QTYPE_MQ; 505 mq->instance = cq->eq->hw->mq_count++; 506 mq 824 hw_del_mq(hw_mq_t *mq) argument 893 hw_mq_t *mq; local [all...] |
/freebsd-11-stable/lib/libthr/thread/ |
H A D | thr_mutex.c | 323 m2 = TAILQ_LAST(&curthread->mq[mutex_qidx(m)], mutex_queue); 450 queue_fork(curthread, &curthread->mq[TMQ_NORM], 451 &curthread->mq[TMQ_NORM_PRIV], 0); 452 queue_fork(curthread, &curthread->mq[TMQ_NORM_PP], 453 &curthread->mq[TMQ_NORM_PP_PRIV], UMUTEX_CONTESTED); 454 queue_fork(curthread, &curthread->mq[TMQ_ROBUST_PP], 455 &curthread->mq[TMQ_ROBUST_PP_PRIV], UMUTEX_CONTESTED); 531 TAILQ_INSERT_TAIL(&curthread->mq[qidx], m, m_qe); 533 TAILQ_INSERT_TAIL(&curthread->mq[qidx + 1], m, m_pqe); 579 TAILQ_REMOVE(&curthread->mq[qid [all...] |