From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 6/6] fix audio_bug related failures
Date: Wed, 27 Jan 2010 00:14:45 +0100 [thread overview]
Message-ID: <1264547685-21129-7-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1264547685-21129-1-git-send-email-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
audio/audio.c | 44 ++++++++++++++++++++------------------------
audio/audio_int.h | 3 ++-
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index 2a20e5b..7fce46c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -118,42 +118,38 @@ struct mixeng_volume nominal_volume = {
static void audio_print_options (const char *prefix,
struct audio_option *opt);
-int audio_bug (const char *funcname, int cond)
+void audio_bug_found (const char *funcname)
{
- if (cond) {
- static int shown;
-
- AUD_log (NULL, "A bug was just triggered in %s\n", funcname);
- if (!shown) {
- struct audio_driver *d;
-
- shown = 1;
- AUD_log (NULL, "Save all your work and restart without audio\n");
- AUD_log (NULL, "Please send bug report to av1474@comtv.ru\n");
- AUD_log (NULL, "I am sorry\n");
- d = glob_audio_state.drv;
- if (d) {
- audio_print_options (d->name, d->options);
- }
+ static int shown;
+
+ AUD_log (NULL, "A bug was just triggered in %s\n", funcname);
+ if (!shown) {
+ struct audio_driver *d;
+
+ shown = 1;
+ AUD_log (NULL, "Save all your work and restart without audio\n");
+ AUD_log (NULL, "Please send bug report to av1474@comtv.ru\n");
+ AUD_log (NULL, "I am sorry\n");
+ d = glob_audio_state.drv;
+ if (d) {
+ audio_print_options (d->name, d->options);
}
- AUD_log (NULL, "Context:\n");
+ }
+ AUD_log (NULL, "Context:\n");
#if defined AUDIO_BREAKPOINT_ON_BUG
# if defined HOST_I386
# if defined __GNUC__
- __asm__ ("int3");
+ __asm__ ("int3");
# elif defined _MSC_VER
- _asm _emit 0xcc;
+ _asm _emit 0xcc;
# else
- abort ();
+ abort ();
# endif
# else
- abort ();
+ abort ();
# endif
#endif
- }
-
- return cond;
}
#endif
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 06e313f..4244615 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -223,7 +223,8 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int len);
int audio_pcm_hw_clip_out (HWVoiceOut *hw, void *pcm_buf,
int live, int pending);
-int audio_bug (const char *funcname, int cond);
+#define audio_bug(funcname, cond) ((cond) ? audio_bug_found (funcname), 1 : 0)
+void audio_bug_found (const char *funcname);
void *audio_calloc (const char *funcname, int nmemb, size_t size);
void audio_run (const char *msg);
--
1.6.6
next prev parent reply other threads:[~2010-01-26 23:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 23:14 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
2010-01-26 23:14 ` [Qemu-devel] [PATCH 1/6] remove two dead assignments in target-i386/translate.c Paolo Bonzini
2010-01-26 23:14 ` [Qemu-devel] [PATCH 2/6] fix undefined shifts by >32 Paolo Bonzini
2010-01-26 23:14 ` [Qemu-devel] [PATCH 3/6] exec.c: dead assignments Paolo Bonzini
2010-01-26 23:14 ` [Qemu-devel] [PATCH 4/6] vnc.c: warn about ignored option Paolo Bonzini
2010-01-27 2:10 ` Anthony Liguori
2010-01-27 10:00 ` Gerd Hoffmann
2010-01-26 23:14 ` [Qemu-devel] [PATCH 5/6] usb-linux.c: remove write-only variable Paolo Bonzini
2010-01-26 23:14 ` Paolo Bonzini [this message]
2010-01-27 2:10 ` [Qemu-devel] [PATCH 6/6] fix audio_bug related failures Anthony Liguori
2010-01-27 11:56 ` [Qemu-devel] " Paolo Bonzini
2010-01-27 21:43 ` Anthony Liguori
2010-01-31 3:08 ` malc
2010-01-31 10:21 ` Paolo Bonzini
2010-01-27 2:09 ` [Qemu-devel] [PATCH 0/6] fix a few clang warnings Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264547685-21129-7-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).