linux-2.6.33/__insert_resource()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#cf0dfa3e]
#backlinks
*説明 [#mb290d03]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#ua56f236]
-struct resource *parent
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#h1ee589f]
-struct resource *
--成功ならば NULL、失敗ならば衝突したリソースへのポインタ...
**参考 [#l72083f8]
*実装 [#lac78117]
/*
* Insert a resource into the resource tree. If successf...
* otherwise return the conflicting resource (compare to...
*/
static struct resource * __insert_resource(struct resour...
{
struct resource *first, *next;
for (;; parent = first) {
first = __request_resource(parent, new);
if (!first)
return first;
if (first == parent)
return first;
if ((first->start > new->start) || (first->end < new->...
break;
if ((first->start == new->start) && (first->end == new...
break;
}
-
--[[linux-2.6.33/__request_resource()]]
for (next = first; ; next = next->sibling) {
/* Partial overlap? Bad, and unfixable */
if (next->start < new->start || next->end > new->end)
return next;
if (!next->sibling)
break;
if (next->sibling->start > new->end)
break;
}
new->parent = parent;
new->sibling = next->sibling;
new->child = first;
next->sibling = NULL;
for (next = first; next; next = next->sibling)
next->parent = new;
if (parent->child == first) {
parent->child = new;
} else {
next = parent->child;
while (next->sibling != first)
next = next->sibling;
next->sibling = new;
}
return NULL;
}
*コメント [#p5abafda]
終了行:
*参照元 [#cf0dfa3e]
#backlinks
*説明 [#mb290d03]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#ua56f236]
-struct resource *parent
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#h1ee589f]
-struct resource *
--成功ならば NULL、失敗ならば衝突したリソースへのポインタ...
**参考 [#l72083f8]
*実装 [#lac78117]
/*
* Insert a resource into the resource tree. If successf...
* otherwise return the conflicting resource (compare to...
*/
static struct resource * __insert_resource(struct resour...
{
struct resource *first, *next;
for (;; parent = first) {
first = __request_resource(parent, new);
if (!first)
return first;
if (first == parent)
return first;
if ((first->start > new->start) || (first->end < new->...
break;
if ((first->start == new->start) && (first->end == new...
break;
}
-
--[[linux-2.6.33/__request_resource()]]
for (next = first; ; next = next->sibling) {
/* Partial overlap? Bad, and unfixable */
if (next->start < new->start || next->end > new->end)
return next;
if (!next->sibling)
break;
if (next->sibling->start > new->end)
break;
}
new->parent = parent;
new->sibling = next->sibling;
new->child = first;
next->sibling = NULL;
for (next = first; next; next = next->sibling)
next->parent = new;
if (parent->child == first) {
parent->child = new;
} else {
next = parent->child;
while (next->sibling != first)
next = next->sibling;
next->sibling = new;
}
return NULL;
}
*コメント [#p5abafda]
ページ名: