From 0370bcf40ce3a07e6e2d33b8bcebf28a0ac98807 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 5 Sep 2018 09:37:11 -0600 Subject: complier.h: add __noreturn and use it in code base Add a __noreturn macro that wraps __attribute__((noreturn)) and replace current users with the macro. Change-Id: Iddd0728cf79678c3d1c1f7e7946c27375a644a7d Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/28505 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel --- src/include/reset.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/include/reset.h') diff --git a/src/include/reset.h b/src/include/reset.h index 934ed9b1fc..48999164bb 100644 --- a/src/include/reset.h +++ b/src/include/reset.h @@ -1,14 +1,16 @@ #ifndef RESET_H #define RESET_H +#include + /* Generic reset functions. Call from code that wants to trigger a reset. */ /* Super-hard reset specific to some Intel SoCs. */ -__attribute__((noreturn)) void global_reset(void); +__noreturn void global_reset(void); /* Full board reset. Resets SoC and most/all board components (e.g. DRAM). */ -__attribute__((noreturn)) void hard_reset(void); +__noreturn void hard_reset(void); /* Board reset. Resets SoC some board components (e.g. TPM but not DRAM). */ -__attribute__((noreturn)) void soft_reset(void); +__noreturn void soft_reset(void); /* Reset implementations. Implement these in SoC or mainboard code. Implement at least hard_reset() if possible, others fall back to it if necessary. */ -- cgit v1.2.3