lkml.org 
[lkml]   [2008]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] B+Tree library
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-10-30 19:01    [W:0.151 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site