From db41d65a97f335167e1fbc0400a83333b5157703 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 28 Dec 2019 10:45:07 -0700 Subject: common: Move hang() to the same header as panic() At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass [trini: Migrate a few more files] Signed-off-by: Tom Rini --- include/common.h | 5 ----- include/hang.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 include/hang.h (limited to 'include') diff --git a/include/common.h b/include/common.h index b25744854c..ca08db0467 100644 --- a/include/common.h +++ b/include/common.h @@ -52,11 +52,6 @@ */ #include -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include /* lib/uuid.c */ diff --git a/include/hang.h b/include/hang.h new file mode 100644 index 0000000000..27cda49359 --- /dev/null +++ b/include/hang.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __HANG_H +#define __HANG_H + +#ifndef __ASSEMBLY__ +/** + * hang() - Print a message and stop execution + * + * This shows a 'hang' message where possible and then goes into an infinite + * loop. This is called by panic() if CONFIG_PANIC_HANG is enabled. + * + * This function does not return. + */ +void hang(void) __attribute__ ((noreturn)); +#endif + +#endif -- cgit