X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lib%2Fprio_heap%2Fprio_heap.c;h=ae47ebb8e4ba8f0b378e9a31b71b56ba4e4c207f;hb=94a7d04ee6e0d9464422e3d680860d8a2464e6c1;hp=0c9bb607510829a0ee62bd3a919d41e4b4b7440e;hpb=c9891db2b888da5f93387125dde69174e9f0e916;p=lttng-modules.git diff --git a/lib/prio_heap/prio_heap.c b/lib/prio_heap/prio_heap.c index 0c9bb607..ae47ebb8 100644 --- a/lib/prio_heap/prio_heap.c +++ b/lib/prio_heap/prio_heap.c @@ -40,24 +40,7 @@ void heap_free(struct ptr_heap *heap) static void heapify(struct ptr_heap *heap, int pos) { - void **ptrs = heap->ptrs; - void *p = ptrs[pos]; - - while (1) { - int left = 2 * pos + 1; - int right = 2 * pos + 2; - int largest = pos; - if (left < heap->size && heap->gt(ptrs[left], p)) - largest = left; - if (right < heap->size && heap->gt(ptrs[right], ptrs[largest])) - largest = right; - if (largest == pos) - break; - /* Push p down the heap one level and bump one up */ - ptrs[pos] = ptrs[largest]; - ptrs[largest] = p; - pos = largest; - } + /* TODO */ } void *heap_replace_max(struct ptr_heap *heap, void *p)