1 /* Header for queue management module */
5 struct queuelem { qelem elem;
8 typedef struct queuelem *queue;
13 stack push(stack,selem);
16 queue qdelete(queue,qelem);
29 #define qinsert(q, e) (((queue) push((stack) (q), (selem) (e)))->next)
30 #define qempty(q) ((q) == NULL)
31 #define pinsert(q, p) (qinsert(q, (qelem) (p)))
32 #define pfront(q) ((word) qfront(q))
33 #define minsert(q, m) (qinsert(q, (qelem) (m)))
34 #define mfront(q) ((message *) qfront(q))
35 #define mdelete(q, m) (qdelete(q, (qelem) (m)))
36 #define mpush(q, m) ((queue) push((stack) q, (selem) m))
37 #define sfree(s) qfree((queue) s)
39 #define pop(s) ((stack) qremove((queue) s))
40 #define top(s) ((selem) qfront((queue) s))