aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-10 05:46:31 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:17:42 -0500
commit7c22f1aaa23370bf9ba2dd3abbccbed70dced216 (patch)
treeebc9c1e5cfdab4815afdfab1ba583e6220287252 /Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
parentf01cc521a2abef5dba24fb0873b9626ba6b0a0a5 (diff)
[ALSA] Remove snd_runtime_check() macro
Remove snd_runtime_check() macro. This macro worsens the readability of codes. They should be either normal if() or removable asserts. Also, the assert displays stack-dump, instead of only the last caller pointer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl')
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl33
1 files changed, 12 insertions, 21 deletions
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 24e85520890b..f3a2fdca9ad2 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -18,8 +18,8 @@
18 </affiliation> 18 </affiliation>
19 </author> 19 </author>
20 20
21 <date>March 6, 2005</date> 21 <date>October 6, 2005</date>
22 <edition>0.3.4</edition> 22 <edition>0.3.5</edition>
23 23
24 <abstract> 24 <abstract>
25 <para> 25 <para>
@@ -30,7 +30,7 @@
30 30
31 <legalnotice> 31 <legalnotice>
32 <para> 32 <para>
33 Copyright (c) 2002-2004 Takashi Iwai <email>tiwai@suse.de</email> 33 Copyright (c) 2002-2005 Takashi Iwai <email>tiwai@suse.de</email>
34 </para> 34 </para>
35 35
36 <para> 36 <para>
@@ -5998,32 +5998,23 @@ struct _snd_pcm_runtime {
5998 The first argument is the expression to evaluate, and the 5998 The first argument is the expression to evaluate, and the
5999 second argument is the action if it fails. When 5999 second argument is the action if it fails. When
6000 <constant>CONFIG_SND_DEBUG</constant>, is set, it will show an 6000 <constant>CONFIG_SND_DEBUG</constant>, is set, it will show an
6001 error message such as <computeroutput>BUG? (xxx) (called from 6001 error message such as <computeroutput>BUG? (xxx)</computeroutput>
6002 yyy)</computeroutput>. When no debug flag is set, this is 6002 together with stack trace.
6003 ignored.
6004 </para> 6003 </para>
6005 </section>
6006
6007 <section id="useful-functions-snd-runtime-check">
6008 <title><function>snd_runtime_check()</function></title>
6009 <para> 6004 <para>
6010 This macro is quite similar with 6005 When no debug flag is set, this macro is ignored.
6011 <function>snd_assert()</function>. Unlike
6012 <function>snd_assert()</function>, the expression is always
6013 evaluated regardless of
6014 <constant>CONFIG_SND_DEBUG</constant>. When
6015 <constant>CONFIG_SND_DEBUG</constant> is set, the macro will
6016 show a message like <computeroutput>ERROR (xx) (called from
6017 yyy)</computeroutput>.
6018 </para> 6006 </para>
6019 </section> 6007 </section>
6020 6008
6021 <section id="useful-functions-snd-bug"> 6009 <section id="useful-functions-snd-bug">
6022 <title><function>snd_BUG()</function></title> 6010 <title><function>snd_BUG()</function></title>
6023 <para> 6011 <para>
6024 It calls <function>snd_assert(0,)</function> -- that is, just 6012 It shows <computeroutput>BUG?</computeroutput> message and
6025 prints the error message at the point. It's useful to show that 6013 stack trace as well as <function>snd_assert</function> at the point.
6026 a fatal error happens there. 6014 It's useful to show that a fatal error happens there.
6015 </para>
6016 <para>
6017 When no debug flag is set, this macro is ignored.
6027 </para> 6018 </para>
6028 </section> 6019 </section>
6029 </chapter> 6020 </chapter>