mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
prioq: add introduction comment
Add comment to prioq.c explaining what it does. And more importantly, mention that we implement a Heap. It's more than annoying having to figure out what the code actually does, without ever mentioning the word 'heap'.
This commit is contained in:
parent
9dc5db34ad
commit
f36f8f7891
@ -19,6 +19,16 @@
|
|||||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
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 "util.h"
|
||||||
#include "prioq.h"
|
#include "prioq.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user