2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
12 * Class declaration for generic queue for use with Windows 95/DJGPP client
15 ***************************************************************************/
20 /* offset of member m in struct T */
21 #define OFFSETOF(T, m) ((USHORT) &(((T *) NULL)->m))
23 /* get pointer to parent struct T containing member m at address p */
24 #define MEM_TO_OBJ(T, m, p) ((char *)(p) - OFFSETOF(T, m))
26 typedef struct _QLink {
32 typedef struct _Queue {
39 /* add item to tail of queue */
40 void QAddT(Queue *queue, QLink* node, int ord);
42 /* add item to head of queue */
43 void QAddH(Queue *queue, QLink *node, int ord);
45 /* add item based on order value */
46 void QAddOrd(Queue *queue, QLink *node, int ord);
48 /* remove and return head of queue */
49 QLink* QServe(Queue *queue);
51 /* move item to tail of queue */
52 void QMoveToTail(Queue *queue, QLink *x, int ord);
54 /* remove item from queue */
55 void QRemove(Queue *queue, QLink* x);
57 /* return current position */
58 QLink *QCurrent(Queue *queue);
60 /* print out list of queued items */
61 void QIterate(Queue *queue);