X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fheap.c;h=682915ac38ba67a3cacbcad1f5d47d959e0b1298;hb=c5cf10598f8c9f4428291e9df3ecd72a05fb1ccf;hp=77b7955cc397dd97ee11c2271417e4862a88c8e3;hpb=95974447c9005f4ad6ef880b2331e7dca0e6f661;p=sliver-openvswitch.git diff --git a/lib/heap.c b/lib/heap.c index 77b7955cc..682915ac3 100644 --- a/lib/heap.c +++ b/lib/heap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Nicira Networks. + * Copyright (c) 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ heap_swap(struct heap *a, struct heap *b) * * This takes time O(lg n). */ void -heap_insert(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_insert(struct heap *heap, struct heap_node *node, uint64_t priority) { heap_raw_insert(heap, node, priority); float_up(heap, node->idx); @@ -89,7 +89,7 @@ heap_remove(struct heap *heap, struct heap_node *node) * * This takes time O(lg n). */ void -heap_change(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_change(struct heap *heap, struct heap_node *node, uint64_t priority) { heap_raw_change(node, priority); float_up_or_down(heap, node->idx); @@ -104,7 +104,7 @@ heap_change(struct heap *heap, struct heap_node *node, uint32_t priority) * * This takes time O(1). */ void -heap_raw_insert(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_raw_insert(struct heap *heap, struct heap_node *node, uint64_t priority) { if (heap->n >= heap->allocated) { heap->allocated = heap->n == 0 ? 1 : 2 * heap->n;