summaryrefslogtreecommitdiff
path: root/lib/pqueue.h
diff options
context:
space:
mode:
authorhasso <hasso>2005-02-21 18:17:52 +0000
committerhasso <hasso>2005-02-21 18:17:52 +0000
commitc3c07f28dcd226975b5ed0c1f8842f51968a3288 (patch)
tree417176baf15d9f9528c7ef6fc65171fcfa68583d /lib/pqueue.h
parente40dcce1f5966d4129b5ecadd905dc2952ac5b30 (diff)
* pqueue.[ch]: Introduce "update" function to meet ospf spf needs. It
will allow to update node when: i) a node is inserted into the priority queue; ii) a node position is modified in the priority queue; * pqueue.h: Export trickle_down() function.
Diffstat (limited to 'lib/pqueue.h')
-rw-r--r--lib/pqueue.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pqueue.h b/lib/pqueue.h
index 95f79b8c..d19c46de 100644
--- a/lib/pqueue.h
+++ b/lib/pqueue.h
@@ -28,6 +28,7 @@ struct pqueue
int size;
int (*cmp) (void *, void *);
+ void (*update) (void * node, int actual_position);
};
#define PQUEUE_INIT_ARRAYSIZE 32
@@ -38,4 +39,6 @@ void pqueue_delete (struct pqueue *queue);
void pqueue_enqueue (void *data, struct pqueue *queue);
void *pqueue_dequeue (struct pqueue *queue);
+void trickle_down (int index, struct pqueue *queue);
+
#endif /* _ZEBRA_PQUEUE_H */