*参照元 [#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 resource *root, struct resource *new) { 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]