[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch v2 2/2] xen: Identify panic and reboot/halt functions as noreturn

>>> On 25.11.13 at 15:02, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/include/xen/shutdown.h
> +++ b/xen/include/xen/shutdown.h
> @@ -1,13 +1,15 @@
>  #ifndef __XEN_SHUTDOWN_H__
>  #define __XEN_SHUTDOWN_H__
> +#include <xen/compiler.h>
> +
>  /* opt_noreboot: If true, machine will need manual reset on error. */
>  extern bool_t opt_noreboot;
> -void dom0_shutdown(u8 reason);
> +void dom0_shutdown(u8 reason) noreturn;
> -void machine_restart(unsigned int delay_millisecs);
> -void machine_halt(void);
> -void machine_power_off(void);
> +void machine_restart(unsigned int delay_millisecs) noreturn;
> +void machine_halt(void) noreturn;
> +void machine_power_off(void) noreturn;

I would have expected that you actually checked that all of these
functions really have no way of returning (even if just because of
an error or mistake). But you can't possibly have done this
verification, or else you would have noticed that there's no
function machine_power_off() in the code base (and I would have
expected your patch to remove the stray declaration instead of
adjusting it).


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.