linux-4.4.1/dma_buf_get()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#h724e1d7]
#backlinks
*説明 [#s6d5633f]
-パス: [[linux-4.4.1/drivers/dma-buf/dma-buf.c]]
-FIXME: これは何?
--説明
**引数 [#o0d6d161]
-int fd
--ファイルディスクリプタ
**返り値 [#c1ab1919]
-struct dma_buf *
--DMA buffer
--[[linux-4.4.1/dma_buf]]
**参考 [#d36716d2]
*実装 [#m4582d22]
/**
* dma_buf_get - returns the dma_buf structure related t...
* @fd: [in] fd associated with the dma_buf to be ret...
*
* On success, returns the dma_buf structure associated ...
* file's refcounting done by fget to increase refcount....
* otherwise.
*/
struct dma_buf *dma_buf_get(int fd)
{
struct file *file;
-
--[[linux-4.4.1/file]]
file = fget(fd);
-
--[[linux-4.4.1/fget()]]
if (!file)
return ERR_PTR(-EBADF);
-
--[[linux-4.4.1/ERR_PTR()]]
if (!is_dma_buf_file(file)) {
fput(file);
return ERR_PTR(-EINVAL);
}
-
--[[linux-4.4.1/is_dma_buf_file()]]
--[[linux-4.4.1/fput()]]
return file->private_data;
}
EXPORT_SYMBOL_GPL(dma_buf_get);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#f75614b8]
終了行:
*参照元 [#h724e1d7]
#backlinks
*説明 [#s6d5633f]
-パス: [[linux-4.4.1/drivers/dma-buf/dma-buf.c]]
-FIXME: これは何?
--説明
**引数 [#o0d6d161]
-int fd
--ファイルディスクリプタ
**返り値 [#c1ab1919]
-struct dma_buf *
--DMA buffer
--[[linux-4.4.1/dma_buf]]
**参考 [#d36716d2]
*実装 [#m4582d22]
/**
* dma_buf_get - returns the dma_buf structure related t...
* @fd: [in] fd associated with the dma_buf to be ret...
*
* On success, returns the dma_buf structure associated ...
* file's refcounting done by fget to increase refcount....
* otherwise.
*/
struct dma_buf *dma_buf_get(int fd)
{
struct file *file;
-
--[[linux-4.4.1/file]]
file = fget(fd);
-
--[[linux-4.4.1/fget()]]
if (!file)
return ERR_PTR(-EBADF);
-
--[[linux-4.4.1/ERR_PTR()]]
if (!is_dma_buf_file(file)) {
fput(file);
return ERR_PTR(-EINVAL);
}
-
--[[linux-4.4.1/is_dma_buf_file()]]
--[[linux-4.4.1/fput()]]
return file->private_data;
}
EXPORT_SYMBOL_GPL(dma_buf_get);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#f75614b8]
ページ名: