+/**
+ * heap_init - initialize the heap
+ * @heap: the heap to initialize
+ * @size: maximum number of elements
+ * @gfp: allocation flags
+ * @gt: function to compare the elements
+ *
+ * Returns -ENOMEM if out of memory.
+ */
+extern int heap_init(struct ptr_heap *heap, size_t size,
+ gfp_t gfpmask, int gt(void *a, void *b));
+
+/**
+ * heap_free - free the heap
+ * @heap: the heap to free
+ */
+extern void heap_free(struct ptr_heap *heap);
+
+/**
+ * heap_insert - insert an element into the heap
+ * @heap: the heap to be operated on
+ *
+ * Insert an element into the heap. If the heap is full, return the
+ * largest element between those previously present in the heap and the
+ * element being added, else return NULL.
+ */
+extern void *heap_insert(struct ptr_heap *heap, void *p);