X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fprioq.c;h=d2ec516d297ccaca972cb8d9d85bb36e600c8716;hb=c60d32aa37fc0b10451b0d392d90b3b96eb88ebc;hp=5e567b181d3ae1e6e6d5ded2201e35ae86b82489;hpb=6ae2e4fb95252c321735cc829d350c90ba62d08a;p=elogind.git
diff --git a/src/basic/prioq.c b/src/basic/prioq.c
index 5e567b181..d2ec516d2 100644
--- a/src/basic/prioq.c
+++ b/src/basic/prioq.c
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
@@ -19,7 +17,21 @@
along with systemd; If not, see .
***/
-#include "util.h"
+/*
+ * Priority Queue
+ * The prioq object implements a priority queue. That is, it orders objects by
+ * their priority and allows O(1) access to the object with the highest
+ * priority. Insertion and removal are Î(log n). Optionally, the caller can
+ * provide a pointer to an index which will be kept up-to-date by the prioq.
+ *
+ * The underlying algorithm used in this implementation is a Heap.
+ */
+
+#include
+#include
+
+#include "alloc-util.h"
+#include "hashmap.h"
#include "prioq.h"
struct prioq_item {