linux-2.6.33/snd_pcm_action()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#g0ced083]
#backlinks
*説明 [#pea01480]
-パス: [[linux-2.6.33/sound/core/pcm_native.c]]
-FIXME: これは何?
--説明
**引数 [#wfb1b72b]
-struct action_ops *ops
--
--[[linux-2.6.33/action_ops]]
-struct snd_pcm_substream *substream
--
--[[linux-2.6.33/snd_pcm_substream]]
-int state
--
**返り値 [#x5ffe4e0]
-int
--
**参考 [#gdd997a3]
*実装 [#q16cd553]
/*
* Note: call with stream lock
*/
static int snd_pcm_action(struct action_ops *ops,
struct snd_pcm_substream *substream,
int state)
{
int res;
if (snd_pcm_stream_linked(substream)) {
-
--[[linux-2.6.33/snd_pcm_stream_linked()]]
if (!spin_trylock(&substream->group->lock)) {
spin_unlock(&substream->self_group.lock);
spin_lock(&substream->group->lock);
spin_lock(&substream->self_group.lock);
}
res = snd_pcm_action_group(ops, substream, state, 1);
spin_unlock(&substream->group->lock);
-
--[[linux-2.6.33/snd_pcm_action_group()]]
-
--[[linux-2.6.33/spin_trylock()]]
-
--[[linux-2.6.33/spin_lock()]]
-
--[[linux-2.6.33/spin_unlock()]]
} else {
res = snd_pcm_action_single(ops, substream, state);
}
-
--[[linux-2.6.33/snd_pcm_action_single()]]
return res;
}
*コメント [#w0e30baf]
終了行:
*参照元 [#g0ced083]
#backlinks
*説明 [#pea01480]
-パス: [[linux-2.6.33/sound/core/pcm_native.c]]
-FIXME: これは何?
--説明
**引数 [#wfb1b72b]
-struct action_ops *ops
--
--[[linux-2.6.33/action_ops]]
-struct snd_pcm_substream *substream
--
--[[linux-2.6.33/snd_pcm_substream]]
-int state
--
**返り値 [#x5ffe4e0]
-int
--
**参考 [#gdd997a3]
*実装 [#q16cd553]
/*
* Note: call with stream lock
*/
static int snd_pcm_action(struct action_ops *ops,
struct snd_pcm_substream *substream,
int state)
{
int res;
if (snd_pcm_stream_linked(substream)) {
-
--[[linux-2.6.33/snd_pcm_stream_linked()]]
if (!spin_trylock(&substream->group->lock)) {
spin_unlock(&substream->self_group.lock);
spin_lock(&substream->group->lock);
spin_lock(&substream->self_group.lock);
}
res = snd_pcm_action_group(ops, substream, state, 1);
spin_unlock(&substream->group->lock);
-
--[[linux-2.6.33/snd_pcm_action_group()]]
-
--[[linux-2.6.33/spin_trylock()]]
-
--[[linux-2.6.33/spin_lock()]]
-
--[[linux-2.6.33/spin_unlock()]]
} else {
res = snd_pcm_action_single(ops, substream, state);
}
-
--[[linux-2.6.33/snd_pcm_action_single()]]
return res;
}
*コメント [#w0e30baf]
ページ名: