Lines Matching refs:mq
24 struct msgqueue_entry *mq; in mqe_alloc() local
26 if ((mq = msgq->free) != NULL) in mqe_alloc()
27 msgq->free = mq->next; in mqe_alloc()
29 return mq; in mqe_alloc()
38 static void mqe_free(MsgQueue_t *msgq, struct msgqueue_entry *mq) in mqe_free() argument
40 if (mq) { in mqe_free()
41 mq->next = msgq->free; in mqe_free()
42 msgq->free = mq; in mqe_free()
82 struct msgqueue_entry *mq = msgq->qe; in msgqueue_msglength() local
85 for (mq = msgq->qe; mq; mq = mq->next) in msgqueue_msglength()
86 length += mq->msg.length; in msgqueue_msglength()
100 struct msgqueue_entry *mq; in msgqueue_getmsg() local
102 for (mq = msgq->qe; mq && msgno; mq = mq->next, msgno--); in msgqueue_getmsg()
104 return mq ? &mq->msg : NULL; in msgqueue_getmsg()
117 struct msgqueue_entry *mq = mqe_alloc(msgq); in msgqueue_addmsg() local
120 if (mq) { in msgqueue_addmsg()
126 mq->msg.msg[i] = va_arg(ap, unsigned int); in msgqueue_addmsg()
129 mq->msg.length = length; in msgqueue_addmsg()
130 mq->msg.fifo = 0; in msgqueue_addmsg()
131 mq->next = NULL; in msgqueue_addmsg()
137 *mqp = mq; in msgqueue_addmsg()
140 return mq != NULL; in msgqueue_addmsg()
150 struct msgqueue_entry *mq, *mqnext; in msgqueue_flush() local
152 for (mq = msgq->qe; mq; mq = mqnext) { in msgqueue_flush()
153 mqnext = mq->next; in msgqueue_flush()
154 mqe_free(msgq, mq); in msgqueue_flush()