[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] Add __noreturn function attribute
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 2/2] Add __noreturn function attribute |
Date: |
Fri, 28 Nov 2008 12:47:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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 <address@hidden>
---
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 */
- [Qemu-devel] [PATCH 2/2] Add __noreturn function attribute,
Jan Kiszka <=
- Re: [Qemu-devel] [PATCH 2/2] Add __noreturn function attribute, malc, 2008/11/28
- [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Jan Kiszka, 2008/11/28
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Thiemo Seufer, 2008/11/28
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Avi Kivity, 2008/11/30
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Stefan Weil, 2008/11/30
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Laurent Desnogues, 2008/11/30
- [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Jan Kiszka, 2008/11/30
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Stefan Weil, 2008/11/30
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, Andreas Färber, 2008/11/30
- Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute, M. Warner Losh, 2008/11/30