このページを編集する際は、編集に関する方針に従ってください。

概要

引数

実装

/**

*	radix_tree_gang_lookup_tag - perform multiple lookup on a radix tree
*	                             based on a tag
*	@root:		radix tree root
*	@results:	where the results of the lookup are placed
*	@first_index:	start the lookup from this key
*	@max_items:	place up to this many items at *results
*	@tag:		the tag index
*
*	Performs an index-ascending scan of the tree for present items which
*	have the tag indexed by @tag set.  Places the items at *@results and
*	returns the number of items which were placed at *@results.
*/

unsigned int radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,

		unsigned long first_index, unsigned int max_items, int tag)

{

	const unsigned long max_index = radix_tree_maxindex(root->height);
	unsigned long cur_index = first_index;
	unsigned int ret = 0;
	while (ret < max_items) {
		unsigned int nr_found;
		unsigned long next_index;	/* Index of next search */
		if (cur_index > max_index)
			break;
		nr_found = __lookup_tag(root, results + ret, cur_index,
					max_items - ret, &next_index, tag);
    • 詳細は__lookup_tag()/linux2.6?を参照
		ret += nr_found;
		if (next_index == 0)
			break;
		cur_index = next_index;
	}
	return ret;

}

EXPORT_SYMBOL(radix_tree_gang_lookup_tag);

呼出元


履歴

  • 作者:ひら
  • 日付:2007/1/18
  • 対象:2.6.10
    更新日更新者更新内容

コメント/タグ?



トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2009-11-24 (火) 07:17:30 (3129d)