summaryrefslogtreecommitdiff
path: root/rbtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbtree.h')
-rw-r--r--rbtree.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/rbtree.h b/rbtree.h
new file mode 100644
index 0000000..3b45428
--- /dev/null
+++ b/rbtree.h
@@ -0,0 +1,18 @@
+#ifndef NASM_RBTREE_H
+#define NASM_RBTREE_H
+
+#include "compiler.h"
+#include <inttypes.h>
+
+struct rbtree {
+ uint64_t key;
+ void *data;
+ struct rbtree *left, *right;
+ bool red;
+};
+
+struct rbtree *rb_insert(struct rbtree *, uint64_t, void *);
+const struct rbtree *rb_search(const struct rbtree *, uint64_t);
+void rb_free(struct rbtree *);
+
+#endif /* NASM_RBTREE_H */