Lines Matching refs:heap

65  *  + heap management functions;
179 CTLFLAG_RD | CTLFLAG_LOCKED, &ready_heap.size, 0, "Size of ready heap");
181 CTLFLAG_RD | CTLFLAG_LOCKED, &extract_heap.size, 0, "Size of extract heap");
250 * In the heap, first node is element 0. Children of i are 2i+1 and 2i+2.
253 * heap_init() is called to expand the heap when needed.
568 * Insert element in heap. Normally, p != NULL, we insert p in
572 * Returns 1 on failure (cannot allocate new heap entry)
574 * If offset > 0 the position (index, int) of the element in the heap is
577 #define SET_OFFSET(heap, node) \
578 if (heap->offset > 0) \
579 *((int *)((char *)(heap->p[node].object) + heap->offset)) = node ;
583 #define RESET_OFFSET(heap, node) \
584 if (heap->offset > 0) \
585 *((int *)((char *)(heap->p[node].object) + heap->offset)) = -1 ;
618 * remove top element from heap, or obj if obj != NULL
626 printf("dummynet: warning, extract from empty heap 0x%p\n", h);
632 panic("dummynet: heap_extract from middle not supported on this heap!!!\n");
662 * heap property. It is needed when we delete a bunch of entries.
674 * cleanup the heap and free data structure
685 * --- end of heap management functions ---
754 /* if there are leftover packets, put the pipe into the heap for next ready event */
910 heap_extract(sch, NULL); /* remove queue from heap */
955 * no traffic and no events scheduled. We can get rid of idle-heap.
1037 printf("dummynet: warning, heap %d is %d ticks late\n",
1353 /* entry is idle and not in any heap, expire it */
2196 * Helper function to remove from a heap queues which are linked to
2215 * helper function to remove a pipe from a heap (can be there at most once)