linux-2.6.33/__request_resource()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#afa73bbf]
#backlinks
*説明 [#i3316f25]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#kf088b00]
-struct resource *root
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#wef1da3f]
-struct resource *
--成功ならば NULL、失敗ならば衝突したリソースへのポインタ...
**参考 [#ne546ab4]
*実装 [#oa6f5f7b]
/* Return the conflict entry if you can't request it */
static struct resource * __request_resource(struct resou...
{
resource_size_t start = new->start;
resource_size_t end = new->end;
struct resource *tmp, **p;
-
--[[linux-2.6.33/resource_size_t]]
if (end < start)
return root;
if (start < root->start)
return root;
if (end > root->end)
return root;
p = &root->child;
for (;;) {
tmp = *p;
if (!tmp || tmp->start > end) {
new->sibling = tmp;
*p = new;
new->parent = root;
return NULL;
}
p = &tmp->sibling;
if (tmp->end < start)
continue;
return tmp;
}
}
*コメント [#h98d3c29]
終了行:
*参照元 [#afa73bbf]
#backlinks
*説明 [#i3316f25]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#kf088b00]
-struct resource *root
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#wef1da3f]
-struct resource *
--成功ならば NULL、失敗ならば衝突したリソースへのポインタ...
**参考 [#ne546ab4]
*実装 [#oa6f5f7b]
/* Return the conflict entry if you can't request it */
static struct resource * __request_resource(struct resou...
{
resource_size_t start = new->start;
resource_size_t end = new->end;
struct resource *tmp, **p;
-
--[[linux-2.6.33/resource_size_t]]
if (end < start)
return root;
if (start < root->start)
return root;
if (end > root->end)
return root;
p = &root->child;
for (;;) {
tmp = *p;
if (!tmp || tmp->start > end) {
new->sibling = tmp;
*p = new;
new->parent = root;
return NULL;
}
p = &tmp->sibling;
if (tmp->end < start)
continue;
return tmp;
}
}
*コメント [#h98d3c29]
ページ名: