Commit graph

3 commits

Author SHA1 Message Date
H. Peter Anvin
ef11aa889b rbtree: drop "const" from search function
Having the search argument and result be "const" is nice in theory,
but causes problems in practice.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-06 19:54:05 -08:00
H. Peter Anvin
e8873121aa rbtree: drop the data pointer; instead rely on being embedded
Drop the data pointer, and instead assume the struct rbtree will be
embedded in a bigger data structure (to be extracted via
container_of()).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-30 10:58:28 -07:00
H. Peter Anvin
3e364fe274 Left-leaning red-black tree data structure
Implement library functions for "left-leaning red-black trees" with
uint64_t keys.  This is meant for looking up symbols by address in the
backends that need to do so, e.g. ELF.

A good question is if there is a better way to do this, that recovers
the original symbol, but that's a future issue.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 23:31:56 -07:00