• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/xnu-2782.1.97/osfmk/kern/

Lines Matching defs:elt

111  *	enqueue puts "elt" on the "queue".
113 * remqueue removes the specified "elt" from its queue.
116 #define enqueue(queue,elt) enqueue_tail(queue, elt)
122 static inline void __QUEUE_ELT_VALIDATE(queue_entry_t elt) {
125 if (__improbable(elt == (queue_entry_t)0)) {
126 panic("Invalid queue element %p", elt);
129 elt_next = elt->next;
130 elt_prev = elt->prev;
133 panic("Invalid queue element pointers for %p: next %p prev %p", elt, elt_next, elt_prev);
135 if (__improbable(elt_next->prev != elt || elt_prev->next != elt)) {
137 elt, elt_next, elt_next->prev, elt_prev, elt_prev->next);
141 static inline void __DEQUEUE_ELT_CLEANUP(queue_entry_t elt) {
142 (elt)->next = (queue_entry_t) 0;
143 (elt)->prev = (queue_entry_t) 0;
146 #define __QUEUE_ELT_VALIDATE(elt) do { } while (0)
147 #define __DEQUEUE_ELT_CLEANUP(elt) do { } while(0)
153 queue_entry_t elt)
159 elt->next = old_head;
160 elt->prev = que;
161 old_head->prev = elt;
162 que->next = elt;
168 queue_entry_t elt)
174 elt->next = que;
175 elt->prev = old_tail;
176 old_tail->next = elt;
177 que->prev = elt;
184 queue_entry_t elt = (queue_entry_t) 0;
188 elt = que->next;
189 __QUEUE_ELT_VALIDATE(elt);
190 new_head = elt->next; /* new_head may point to que if elt was the only element */
193 __DEQUEUE_ELT_CLEANUP(elt);
196 return (elt);
203 queue_entry_t elt = (queue_entry_t) 0;
207 elt = que->prev;
208 __QUEUE_ELT_VALIDATE(elt);
209 new_tail = elt->prev; /* new_tail may point to queue if elt was the only element */
212 __DEQUEUE_ELT_CLEANUP(elt);
215 return (elt);
220 queue_entry_t elt)
224 __QUEUE_ELT_VALIDATE(elt);
225 next_elt = elt->next;
226 prev_elt = elt->prev; /* next_elt may equal prev_elt (and the queue head) if elt was the only element */
229 __DEQUEUE_ELT_CLEANUP(elt);
249 queue_entry_t elt)
253 __QUEUE_ELT_VALIDATE(elt);
254 next_elt = elt->next;
255 prev_elt = elt->prev; /* next_elt may equal prev_elt (and the queue head) if elt was the only element */
258 __DEQUEUE_ELT_CLEANUP(elt);
350 * void queue_enter(q, elt, type, field)
352 * <type> elt;
356 #define queue_enter(head, elt, type, field) \
362 (head)->next = (queue_entry_t) (elt); \
366 (queue_entry_t)(elt); \
368 (elt)->field.prev = __prev; \
369 (elt)->field.next = head; \
370 (head)->prev = (queue_entry_t) elt; \
378 * void queue_enter_first(q, elt, type, field)
380 * <type> elt;
384 #define queue_enter_first(head, elt, type, field) \
390 (head)->prev = (queue_entry_t) (elt); \
394 (queue_entry_t)(elt); \
396 (elt)->field.next = __next; \
397 (elt)->field.prev = head; \
398 (head)->next = (queue_entry_t) elt; \
406 * void queue_insert_before(q, elt, cur, type, field)
408 * <type> elt;
413 #define queue_insert_before(head, elt, cur, type, field) \
418 (elt)->field.next = (head); \
420 (elt)->field.prev = (head); \
421 (head)->next = (queue_entry_t)(elt); \
423 __prev = (elt)->field.prev = (head)->prev; \
425 (queue_entry_t)(elt); \
427 (head)->prev = (queue_entry_t)(elt); \
429 (elt)->field.next = (queue_entry_t)(cur); \
432 (elt)->field.prev = (head); \
433 (head)->next = (queue_entry_t)(elt); \
435 __prev = (elt)->field.prev = (cur)->field.prev; \
437 (queue_entry_t)(elt); \
439 (cur)->field.prev = (queue_entry_t)(elt); \
448 * void queue_insert_after(q, elt, cur, type, field)
450 * <type> elt;
455 #define queue_insert_after(head, elt, cur, type, field) \
460 (elt)->field.prev = (head); \
462 (elt)->field.next = (head); \
463 (head)->prev = (queue_entry_t)(elt); \
465 __next = (elt)->field.next = (head)->next; \
467 (queue_entry_t)(elt); \
469 (head)->next = (queue_entry_t)(elt); \
471 (elt)->field.prev = (queue_entry_t)(cur); \
474 (elt)->field.next = (head); \
475 (head)->prev = (queue_entry_t)(elt); \
477 __next = (elt)->field.next = (cur)->field.next; \
479 (queue_entry_t)(elt); \
481 (cur)->field.next = (queue_entry_t)(elt); \
502 #define queue_remove(head, elt, type, field) \
506 __next = (elt)->field.next; \
507 __prev = (elt)->field.prev; \
519 (elt)->field.next = NULL; \
520 (elt)->field.prev = NULL; \
613 * Generates a 'for' loop, setting elt to
616 * queue_iterate(q, elt, type, field)
618 * <type> elt;
622 #define queue_iterate(head, elt, type, field) \
623 for ((elt) = (type)(void *) queue_first(head); \
624 !queue_end((head), (queue_entry_t)(elt)); \
625 (elt) = (type)(void *) queue_next(&(elt)->field))
677 #define mpenqueue_tail(q, elt) \
680 enqueue_tail(&(q)->head, elt); \
684 #define mpdequeue_head(q, elt) \
688 *(elt) = 0; \
690 *(elt) = dequeue_head(&(q)->head); \