*参照元 [#lfa02132]
#backlinks

*説明 [#v7c606aa]
-パス: [[linux-2.6.33/mm/vmalloc.c]]

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


**引数 [#yc6ae8f3]
-const void *addr
--


**返り値 [#y95ae257]
-struct vm_struct *
--
--[[linux-2.6.33/vm_struct]]


**参考 [#ofd285a9]


*実装 [#cb357f2e]
 /**
  *	remove_vm_area  -  find and remove a continuous kernel virtual area
  *	@addr:		base address
  *
  *	Search for the kernel VM area starting at @addr, and remove it.
  *	This function returns the found VM area, but using it is NOT safe
  *	on SMP machines, except for its size or flags.
  */
 struct vm_struct *remove_vm_area(const void *addr)
 {
 	struct vmap_area *va;
 
-
--[[linux-2.6.33/vmap_area]]

 	va = find_vmap_area((unsigned long)addr);
-
--[[linux-2.6.33/find_vmap_area()]]

 	if (va && va->flags & VM_VM_AREA) {
 		struct vm_struct *vm = va->private;
 		struct vm_struct *tmp, **p;
-
--[[linux-2.6.33/VM_VM_AREA]]

 		/*
 		 * remove from list and disallow access to this vm_struct
 		 * before unmap. (address range confliction is maintained by
 		 * vmap.)
 		 */
 		write_lock(&vmlist_lock);
-
--[[linux-2.6.33/vmlist_lock(global)]]
-
--[[linux-2.6.33/write_lock()]]

 		for (p = &vmlist; (tmp = *p) != vm; p = &tmp->next)
 			;
 		*p = tmp->next;
 		write_unlock(&vmlist_lock);
 
-
--[[linux-2.6.33/vmlist(global)]]
-
--[[linux-2.6.33/write_unlock()]]

 		vmap_debug_free_range(va->va_start, va->va_end);
-
--[[linux-2.6.33/vmap_debug_free_range()]]

 		free_unmap_vmap_area(va);
 		vm->size -= PAGE_SIZE;
 
-
--[[linux-2.6.33/free_unmap_vmap_area()]]
-
--[[linux-2.6.33/PAGE_SIZE]]

 		return vm;
 	}
 	return NULL;
 }


*コメント [#x4757271]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS