Merge radixtree changes from yamt-pagecache.

This commit is contained in:
ad 2019-12-05 18:32:25 +00:00
parent d1546fa78e
commit 0558f52127
2 changed files with 424 additions and 210 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $NetBSD: radixtree.h,v 1.5 2011/10/25 14:11:27 yamt Exp $ */
/* $NetBSD: radixtree.h,v 1.6 2019/12/05 18:32:25 ad Exp $ */
/*-
* Copyright (c)2011 YAMAMOTO Takashi,
@ -66,23 +66,24 @@ void *radix_tree_replace_node(struct radix_tree *, uint64_t, void *);
void *radix_tree_remove_node(struct radix_tree *, uint64_t);
void *radix_tree_lookup_node(struct radix_tree *, uint64_t);
unsigned int radix_tree_gang_lookup_node(struct radix_tree *, uint64_t,
void **, unsigned int);
void **, unsigned int, bool);
unsigned int radix_tree_gang_lookup_node_reverse(struct radix_tree *, uint64_t,
void **, unsigned int);
void **, unsigned int, bool);
/*
* tag
*/
typedef int radix_tree_tagid_t;
typedef unsigned int radix_tree_tagmask_t;
#define RADIX_TREE_TAG_ID_MAX 2
bool radix_tree_get_tag(struct radix_tree *, uint64_t, radix_tree_tagid_t);
void radix_tree_set_tag(struct radix_tree *, uint64_t, radix_tree_tagid_t);
void radix_tree_clear_tag(struct radix_tree *, uint64_t, radix_tree_tagid_t);
radix_tree_tagmask_t radix_tree_get_tag(struct radix_tree *, uint64_t,
radix_tree_tagmask_t);
void radix_tree_set_tag(struct radix_tree *, uint64_t, radix_tree_tagmask_t);
void radix_tree_clear_tag(struct radix_tree *, uint64_t, radix_tree_tagmask_t);
unsigned int radix_tree_gang_lookup_tagged_node(struct radix_tree *, uint64_t,
void **, unsigned int, radix_tree_tagid_t);
void **, unsigned int, bool, radix_tree_tagmask_t);
unsigned int radix_tree_gang_lookup_tagged_node_reverse(struct radix_tree *,
uint64_t, void **, unsigned int, radix_tree_tagid_t);
bool radix_tree_empty_tagged_tree_p(struct radix_tree *, radix_tree_tagid_t);
uint64_t, void **, unsigned int, bool, radix_tree_tagmask_t);
bool radix_tree_empty_tagged_tree_p(struct radix_tree *, radix_tree_tagmask_t);
#endif /* !defined(_SYS_RADIXTREE_H_) */