Make lib/prio_tree.c a stand-alone library
[fio.git] / lib / prio_tree.c
index b0e935cdace5f051af293dd2ea9a2aef8997794e..de3fe1c025276bea0f34a5ee10ce8896ec662507 100644 (file)
 
 #include <stdlib.h>
 #include <limits.h>
-#include "../fio.h"
+
+#include "../compiler/compiler.h"
 #include "prio_tree.h"
 
+#define ARRAY_SIZE(x)    (sizeof((x)) / (sizeof((x)[0])))
+
 /*
  * A clever mix of heap and radix trees forms a radix priority search tree (PST)
  * which is useful for storing intervals, e.g, we can consider a vma as a closed
@@ -49,7 +52,7 @@ static void get_index(const struct prio_tree_node *node,
 
 static unsigned long index_bits_to_maxindex[BITS_PER_LONG];
 
-void fio_init prio_tree_init(void)
+static void fio_init prio_tree_init(void)
 {
        unsigned int i;