summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-09-29 14:33:47 +0200
committerMichal Schmidt <mschmidt@redhat.com>2015-09-29 14:33:47 +0200
commit9d66db1d0390ef8ca7a32a3fe142d5c3732903b6 (patch)
treeba99c4d162e2c066b6c2f84b40781e785af6f006
parent9dc5db34adbd6fa3d2ac08d9610d401ba69cde93 (diff)
parentf36f8f78917679f04d6735a79c317b2d4bfeec18 (diff)
Merge pull request #1403 from dvdhrm/prioq-comment
prioq: add introduction comment
-rw-r--r--src/basic/prioq.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/basic/prioq.c b/src/basic/prioq.c
index b89888be0e..69ec45d97e 100644
--- a/src/basic/prioq.c
+++ b/src/basic/prioq.c
@@ -19,6 +19,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+/*
+ * 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 "util.h"
#include "prioq.h"