summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-28 10:45:07 -0700
committerJagan Teki <jagan@amarulasolutions.com>2020-01-24 23:06:49 +0530
commit29a4a9f1056fd4cc319c248c2e062cd91f6fa9f2 (patch)
tree39cad10f99f666ebec3546649f33c3d669483bea /include
parented782a74547cd12634051e503c86ac4e1f754775 (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 <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/common.h5
-rw-r--r--include/hang.h22
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, 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