diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-08-07 16:15:44 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-08-07 16:15:44 +0000 |
commit | 6b839ff47b68e5f12898f239d64ad617b4237b10 (patch) | |
tree | 31c4273ce1dc17ee2b505fb85c2628df540d0fd3 /sys/compat/linuxkpi/common/include | |
parent | 11412d5bc9215d065730856cea8c8a1b861ab3e7 (diff) | |
download | src-6b839ff47b68e5f12898f239d64ad617b4237b10.tar.gz src-6b839ff47b68e5f12898f239d64ad617b4237b10.zip |
Implement radix_tree_store() in the LinuxKPI for use with the coming
extensible arrays implementation.
While at it add some more comments explaining the current
radix_tree_insert() function and make sure to clean the root node when
the radix tree reaches the maximum height. This can happen if the
index passed is too big when the tree is empty.
The radix_tree_store() function is basically a copy of the
radix_tree_insert() function with some added functionality.
The radix_tree_store() function is local to FreeBSD and does not yet
exist in Linux.
Reviewed by: kib
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=364028
Diffstat (limited to 'sys/compat/linuxkpi/common/include')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/radix-tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index a4ef12b11f74..1bef60c44c41 100644 --- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h @@ -78,6 +78,7 @@ radix_tree_exception(void *arg) void *radix_tree_lookup(struct radix_tree_root *, unsigned long); void *radix_tree_delete(struct radix_tree_root *, unsigned long); int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); +int radix_tree_store(struct radix_tree_root *, unsigned long, void **); bool radix_tree_iter_find(struct radix_tree_root *, struct radix_tree_iter *, void ***); void radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **); |