*参照元 [#yb6db1a3]
#backlinks

*説明 [#cf849f98]
-パス: [[linux-2.6.33/]]

-FIXME: これは何?
--説明


**引数 [#d50ef4fa]
-
--

**返り値 [#ja2fae3c]
-
--

**参考 [#l2250044]


*実装 [#u911900a]
 /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
 struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 {
 	struct vm_area_struct *vma = NULL;
 
 	if (mm) {
 		/* Check the cache first. */
 		/* (Cache hit rate is typically around 35%.) */
 		vma = mm->mmap_cache;
 		if (!(vma && vma->vm_end > addr && vma->vm_start <= addr)) {
 			struct rb_node * rb_node;
 
 			rb_node = mm->mm_rb.rb_node;
 			vma = NULL;
 
 			while (rb_node) {
 				struct vm_area_struct * vma_tmp;
 
 				vma_tmp = rb_entry(rb_node,
 						struct vm_area_struct, vm_rb);
 
 				if (vma_tmp->vm_end > addr) {
 					vma = vma_tmp;
 					if (vma_tmp->vm_start <= addr)
 						break;
 					rb_node = rb_node->rb_left;
 				} else
 					rb_node = rb_node->rb_right;
 			}
 			if (vma)
 				mm->mmap_cache = vma;
 		}
 	}
 	return vma;
 }
 
 EXPORT_SYMBOL(find_vma);
-特にライセンスを区別せずにシンボルをエクスポートする。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#g5e0b2b8]


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS