qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] Add __noreturn function attribute
Date: Fri, 28 Nov 2008 12:47:41 +0100	[thread overview]
Message-ID: <492FDA5D.6080602@siemens.com> (raw)

Introduce __noreturn attribute and attach it to cpu_loop_exit as well as
interrupt/exception helpers for i386. This avoids a bunch of gcc4
warnings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 exec-all.h         |    5 ++++-
 target-i386/exec.h |    8 ++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/exec-all.h b/exec-all.h
index ca97f57..4934932 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -20,6 +20,9 @@
 
 #ifndef _EXEC_ALL_H_
 #define _EXEC_ALL_H_
+
+#define __noreturn __attribute__ ((__noreturn__))
+
 /* allow to see translation results - the slowdown should be negligible, so we leave it */
 #define DEBUG_DISAS
 
@@ -82,7 +85,7 @@ TranslationBlock *tb_gen_code(CPUState *env,
                               target_ulong pc, target_ulong cs_base, int flags,
                               int cflags);
 void cpu_exec_init(CPUState *env);
-void cpu_loop_exit(void);
+void __noreturn cpu_loop_exit(void);
 int page_unprotect(target_ulong address, unsigned long pc, void *puc);
 void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end,
                                    int is_cpu_write_access);
diff --git a/target-i386/exec.h b/target-i386/exec.h
index 3663166..b35f08b 100644
--- a/target-i386/exec.h
+++ b/target-i386/exec.h
@@ -67,10 +67,10 @@ void do_interrupt(int intno, int is_int, int error_code,
                   target_ulong next_eip, int is_hw);
 void do_interrupt_user(int intno, int is_int, int error_code,
                        target_ulong next_eip);
-void raise_interrupt(int intno, int is_int, int error_code,
-                     int next_eip_addend);
-void raise_exception_err(int exception_index, int error_code);
-void raise_exception(int exception_index);
+void __noreturn raise_interrupt(int intno, int is_int, int error_code,
+                                int next_eip_addend);
+void __noreturn raise_exception_err(int exception_index, int error_code);
+void __noreturn raise_exception(int exception_index);
 void do_smm_enter(void);
 
 /* n must be a constant to be efficient */

             reply	other threads:[~2008-11-28 11:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 11:47 Jan Kiszka [this message]
2008-11-28 17:35 ` [Qemu-devel] [PATCH 2/2] Add __noreturn function attribute malc
2008-11-28 17:56   ` [Qemu-devel] " Jan Kiszka
2008-11-28 18:28     ` Thiemo Seufer
2008-11-30 10:08     ` Avi Kivity
2008-11-30 11:51       ` Stefan Weil
2008-11-30 12:00         ` Laurent Desnogues
2008-11-30 12:38           ` Jan Kiszka
2008-11-30 12:52             ` Stefan Weil
2008-11-30 13:37               ` Andreas Färber
2008-11-30 17:21               ` M. Warner Losh
2008-11-30 12:33       ` Jan Kiszka
2008-11-30 13:11         ` Thiemo Seufer
2008-11-30 14:36           ` Jan Kiszka
2008-12-02 19:49             ` Anthony Liguori
2008-12-04 16:44               ` Jan Kiszka
2008-12-04 18:39                 ` Jan Kiszka

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=492FDA5D.6080602@siemens.com \
    --to=jan.kiszka@siemens.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).