Re: [RFC] B+Tree library

From: JÃrn Engel
Date: Thu Oct 30 2008 - 13:59:05 EST


On Thu, 30 October 2008 18:43:00 +0100, Pavel Machek wrote:
>
> + * Disks have fulfilled the prerequite for a long time. More recently DRAM
>
> prerequisite?

In the paragraph above:

+ * B+Trees can be used similar to Linux radix trees (which don't have anything
+ * in common with textbook radix trees, beware). Prerequisite for them working
+ * well is that access to a random tree node is much faster than a large number
+ * of operations within each node.

> +#define MAX(a, b) ((a) > (b) ? (a) : (b))
>
> We already have that in the headers somewhere.

Except that min/max in include/linux/kernel.h have some type-safety
added. In this particular case that is actually a disadvantage:
CC lib/btree.o
lib/btree.c:56: error: braced-group within expression allowed only inside a function
lib/btree.c:62: error: braced-group within expression allowed only inside a function
lib/btree.c:67: error: braced-group within expression allowed only inside a function

So I need something more stupid. :)

JÃrn

--
It does not require a majority to prevail, but rather an irate,
tireless minority keen to set brush fires in people's minds.
-- Samuel Adams
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/