linux-2.6.33/insert_resource()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#qc772531]
#backlinks
*説明 [#pfae118d]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#n1a667ce]
-struct resource *parent
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#le40eec3]
-int
--成功ならば 0、失敗ならば負のエラー値。
**参考 [#zdb5024e]
*実装 [#l1ef2e7a]
/**
* insert_resource - Inserts a resource in the resource ...
* @parent: parent of the new resource
* @new: new resource to insert
*
* Returns 0 on success, -EBUSY if the resource can't be...
*
* This function is equivalent to request_resource when ...
* happens. If a conflict happens, and the conflicting r...
* entirely fit within the range of the new resource, th...
* resource is inserted and the conflicting resources be...
* the new resource.
*/
int insert_resource(struct resource *parent, struct reso...
{
struct resource *conflict;
write_lock(&resource_lock);
conflict = __insert_resource(parent, new);
write_unlock(&resource_lock);
-
--[[linux-2.6.33/write_lock()]]
-
--[[linux-2.6.33/__insert_resource()]]
-
--[[linux-2.6.33/write_unlock()]]
return conflict ? -EBUSY : 0;
}
*コメント [#kd4db132]
終了行:
*参照元 [#qc772531]
#backlinks
*説明 [#pfae118d]
-パス: [[linux-2.6.33/kernel/resource.c]]
-FIXME: これは何?
--説明
**引数 [#n1a667ce]
-struct resource *parent
--
--[[linux-2.6.33/resource]]
-struct resource *new
--
**返り値 [#le40eec3]
-int
--成功ならば 0、失敗ならば負のエラー値。
**参考 [#zdb5024e]
*実装 [#l1ef2e7a]
/**
* insert_resource - Inserts a resource in the resource ...
* @parent: parent of the new resource
* @new: new resource to insert
*
* Returns 0 on success, -EBUSY if the resource can't be...
*
* This function is equivalent to request_resource when ...
* happens. If a conflict happens, and the conflicting r...
* entirely fit within the range of the new resource, th...
* resource is inserted and the conflicting resources be...
* the new resource.
*/
int insert_resource(struct resource *parent, struct reso...
{
struct resource *conflict;
write_lock(&resource_lock);
conflict = __insert_resource(parent, new);
write_unlock(&resource_lock);
-
--[[linux-2.6.33/write_lock()]]
-
--[[linux-2.6.33/__insert_resource()]]
-
--[[linux-2.6.33/write_unlock()]]
return conflict ? -EBUSY : 0;
}
*コメント [#kd4db132]
ページ名: