diff options
| author | Simon Glass <[email protected]> | 2019-12-28 10:45:07 -0700 |
|---|---|---|
| committer | Jagan Teki <[email protected]> | 2020-01-24 23:06:49 +0530 |
| commit | 29a4a9f1056fd4cc319c248c2e062cd91f6fa9f2 (patch) | |
| tree | 39cad10f99f666ebec3546649f33c3d669483bea /include | |
| parent | ed782a74547cd12634051e503c86ac4e1f754775 (diff) | |
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 <[email protected]>
[trini: Migrate a few more files]
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.h | 5 | ||||
| -rw-r--r-- | include/hang.h | 22 |
2 files changed, 22 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h index b25744854c7..ca08db04670 100644 --- a/include/common.h +++ b/include/common.h @@ -52,11 +52,6 @@ */ #include <init.h> -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include <display_options.h> /* lib/uuid.c */ diff --git a/include/hang.h b/include/hang.h new file mode 100644 index 00000000000..27cda493592 --- /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, [email protected]. + */ + +#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 |
