summaryrefslogtreecommitdiff
path: root/rbtree.c
Commit message (Collapse)AuthorAgeFilesLines
* Add copyright headers to the *.c/*.h files in the main directoryH. Peter Anvin2009-06-281-0/+33
| | | | | | | | | | Add copyright headers to the *.c/*.h files in the main directory. For files where I'm sure enough that we have all the approvals, I have given them the 2-BSD license, the others have been given the "LGPL for now" license header. Most of them can probably be changed after auditing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* rbtree: drop "const" from search functionH. Peter Anvin2008-11-061-2/+2
| | | | | | | 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>
* rbtree: drop the data pointer; instead rely on being embeddedH. Peter Anvin2008-10-301-21/+7
| | | | | | | | 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>
* Left-leaning red-black tree data structureH. Peter Anvin2008-10-291-0/+100
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>