linux-user: Mark cpu_loop() with noreturn attribute
PATCH v2 1/1 linux-user: Mark cpu_loop() with noreturn attribute
cpu_loop() never exits, so mark it with QEMU_NORETURN.
---
v2:
- rebased
- restricted to linux-user
Supersedes: <[email protected]>
--- linux-user/user-internals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/user-internals.h +1 -1
@@ -65,7 +65,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8);extern __threadCPUState *thread_cpu; -void cpu_loop (CPUArchState *env); +void QEMU_NORETURN cpu_loop(CPUArchState *env);const char *target_strerror (int err);int get_osversion (void );void init_qemu_uname_release (void );
Signature · 1 line
2.31.1
Quoted 6 lines · Philippe Mathieu-Daudé
cpu_loop()never exits, so mark it withQEMU_NORETURN.Reviewed-by Richard Henderson <[email protected]>Reviewed-by Warner Losh <[email protected]>Reviewed-by Bin Meng <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 7 lines
---
v2:
- rebased
- restricted to linux-userSupersedes: <[email protected]>
bsd-user likely needs similar treatment, no?
---
Quoted 21 lines
linux-user/user-internals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/user-internals.h +1
-1@@ -65,7 +65,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8);extern __threadCPUState *thread_cpu; -void cpu_loop (CPUArchState *env); +void QEMU_NORETURN cpu_loop(CPUArchState *env);const char *target_strerror (int err);int get_osversion (void );void
init_qemu_uname_release(void);
--
2.31.1
Quoted 18 lines · Warner Losh
On Sat, Nov 6, 2021, 5:39 AM Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> wrote:
cpu_loop()never exits, so mark it withQEMU_NORETURN.Reviewed-by Richard Henderson <[email protected]<mailto:[email protected]>>
Reviewed-by Warner Losh <[email protected] <mailto:[email protected]>>Reviewed-by Bin Meng <[email protected] <mailto:[email protected]>>Signed-off-by Philippe Mathieu-Daudé <[email protected]<mailto:[email protected]>>
---
v2:
- rebased
- restricted to linux-user
Quoted 7 lines
Supersedes: <[email protected] <mailto:[email protected]>>
Reviewed-by Warner Losh <[email protected] <mailto:[email protected]>>bsd-user likely needs similar treatment, no?
IIUC this thread, not yet (I didn't want to get into your refactor):
https://lore.kernel.org/qemu-devel/CAFEAcA-f=n6XHp5Cj7=tH8NWO1GLA50i34=5GyaHrZELyr0bjw@mail.gmail.com/
Quoted 24 lines · Philippe Mathieu-Daudé
Quoted 23 lines · Warner Losh
On Sat, Nov 6, 2021, 5:39 AM Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> wrote:
cpu_loop()never exits, so mark it withQEMU_NORETURN.Reviewed-by Richard Henderson <[email protected]<mailto:[email protected]>>
Reviewed-by Warner Losh <[email protected] <mailto:[email protected]>>Quoted 1 line
Signed-off-by: Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> --- v2: - rebased - restricted to linux-user Supersedes: <[email protected] <mailto:[email protected]>>
Quoted 7 lines
Quoted 3 lines
Reviewed-by Warner Losh <[email protected] <mailto:[email protected]>>bsd-user likely needs similar treatment, no?
IIUC this thread, not yet (I didn't want to get into your refactor):
I'll add it to my TODO items. I hope to get a small collection of those in this month before the release after I land the arm bits.
Warner
Ping? (patch reviewed)
Quoted 30 lines · Philippe Mathieu-Daudé
cpu_loop()never exits, so mark it withQEMU_NORETURN.Reviewed-by Richard Henderson <[email protected]>Reviewed-by Warner Losh <[email protected]>Reviewed-by Bin Meng <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2:
- rebased
- restricted to linux-userSupersedes: <[email protected]>
--- linux-user/user-internals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/user-internals.h +1
-1@@ -65,7 +65,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8);extern __threadCPUState *thread_cpu; -void cpu_loop (CPUArchState *env); +void QEMU_NORETURN cpu_loop(CPUArchState *env);const char *target_strerror (int err);int get_osversion (void );void init_qemu_uname_release (void );
Laurent Vivier
AppliedLe 15/12/2021 à 11:55, Philippe Mathieu-Daudé a écrit :
Quoted 19 lines
Ping? (patch reviewed)
Quoted 16 lines · Philippe Mathieu-Daudé
cpu_loop()never exits, so mark it withQEMU_NORETURN.Reviewed-by Richard Henderson <[email protected]>Reviewed-by Warner Losh <[email protected]>Reviewed-by Bin Meng <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2:
- rebased
- restricted to linux-userSupersedes: <[email protected]>
--- linux-user/user-internals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 6 lines
linux-user/user-internals.h +0
-0linux-user/user-internals.h abi_long do_syscall(void *cpu_env, int num, abi_long arg1, · line 71
Quoted 8 lines
linux-user/user-internals.h +1
-1@@ -65,7 +65,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8);extern __threadCPUState *thread_cpu; -void cpu_loop (CPUArchState *env); +void QEMU_NORETURN cpu_loop(CPUArchState *env);const char *target_strerror (int err);int get_osversion (void );void init_qemu_uname_release (void );
Applied to my linux-user-for-7.0 branch.
Thanks,
Laurent