Lines Matching refs:elt
107 * enqueue puts "elt" on the "queue".
109 * remqueue removes the specified "elt" from the specified "queue".
112 #define enqueue(queue,elt) enqueue_tail(queue, elt)
123 queue_entry_t elt);
128 queue_entry_t elt);
141 queue_entry_t elt);
150 queue_entry_t elt);
159 queue_entry_t elt)
161 elt->next = que->next;
162 elt->prev = que;
163 elt->next->prev = elt;
164 que->next = elt;
170 queue_entry_t elt)
172 elt->next = que;
173 elt->prev = que->prev;
174 elt->prev->next = elt;
175 que->prev = elt;
182 register queue_entry_t elt = (queue_entry_t) 0;
185 elt = que->next;
186 elt->next->prev = que;
187 que->next = elt->next;
190 return (elt);
197 register queue_entry_t elt = (queue_entry_t) 0;
200 elt = que->prev;
201 elt->prev->next = que;
202 que->prev = elt->prev;
205 return (elt);
211 queue_entry_t elt)
213 elt->next->prev = elt->prev;
214 elt->prev->next = elt->next;
230 register queue_entry_t elt)
232 (elt->next)->prev = elt->prev;
233 (elt->prev)->next = elt->next;
235 return((integer_t)elt);
329 * void queue_enter(q, elt, type, field)
331 * <type> elt;
335 #define queue_enter(head, elt, type, field) \
341 (head)->next = (queue_entry_t) (elt); \
344 ((type)__prev)->field.next = (queue_entry_t)(elt);\
346 (elt)->field.prev = __prev; \
347 (elt)->field.next = head; \
348 (head)->prev = (queue_entry_t) elt; \
356 * void queue_enter_first(q, elt, type, field)
358 * <type> elt;
362 #define queue_enter_first(head, elt, type, field) \
368 (head)->prev = (queue_entry_t) (elt); \
371 ((type)__next)->field.prev = (queue_entry_t)(elt);\
373 (elt)->field.next = __next; \
374 (elt)->field.prev = head; \
375 (head)->next = (queue_entry_t) elt; \
383 * void queue_insert_before(q, elt, cur, type, field)
385 * <type> elt;
390 #define queue_insert_before(head, elt, cur, type, field) \
395 (elt)->field.next = (head); \
397 (elt)->field.prev = (head); \
398 (head)->next = (queue_entry_t)(elt); \
400 __prev = (elt)->field.prev = (head)->prev; \
401 ((type)__prev)->field.next = (queue_entry_t)(elt);\
403 (head)->prev = (queue_entry_t)(elt); \
405 (elt)->field.next = (queue_entry_t)(cur); \
408 (elt)->field.prev = (head); \
409 (head)->next = (queue_entry_t)(elt); \
411 __prev = (elt)->field.prev = (cur)->field.prev; \
412 ((type)__prev)->field.next = (queue_entry_t)(elt);\
414 (cur)->field.prev = (queue_entry_t)(elt); \
423 * void queue_insert_after(q, elt, cur, type, field)
425 * <type> elt;
430 #define queue_insert_after(head, elt, cur, type, field) \
435 (elt)->field.prev = (head); \
437 (elt)->field.next = (head); \
438 (head)->prev = (queue_entry_t)(elt); \
440 __next = (elt)->field.next = (head)->next; \
441 ((type)__next)->field.prev = (queue_entry_t)(elt);\
443 (head)->next = (queue_entry_t)(elt); \
445 (elt)->field.prev = (queue_entry_t)(cur); \
448 (elt)->field.next = (head); \
449 (head)->prev = (queue_entry_t)(elt); \
451 __next = (elt)->field.next = (cur)->field.next; \
452 ((type)__next)->field.prev = (queue_entry_t)(elt);\
454 (cur)->field.next = (queue_entry_t)(elt); \
475 #define queue_remove(head, elt, type, field) \
479 __next = (elt)->field.next; \
480 __prev = (elt)->field.prev; \
492 (elt)->field.next = NULL; \
493 (elt)->field.prev = NULL; \
584 * Generates a 'for' loop, setting elt to
587 * queue_iterate(q, elt, type, field)
589 * <type> elt;
593 #define queue_iterate(head, elt, type, field) \
594 for ((elt) = (type) queue_first(head); \
595 !queue_end((head), (queue_entry_t)(elt)); \
596 (elt) = (type) queue_next(&(elt)->field))
621 #define mpenqueue_tail(q, elt) \
624 enqueue_tail(&(q)->head, elt); \
628 #define mpdequeue_head(q, elt) \
632 *(elt) = 0; \
634 *(elt) = dequeue_head(&(q)->head); \