summaryrefslogtreecommitdiffstats
path: root/include/hang.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-28 10:45:07 -0700
committerTom Rini <trini@konsulko.com>2020-01-17 17:53:40 -0500
commitdb41d65a97f335167e1fbc0400a83333b5157703 (patch)
tree6ac31cad782169c4fe60c6195ec7ed2ca4b6298f /include/hang.h
parent49acd56e4f1b0cb76af73bb1b22db20c81af3f78 (diff)
downloadu-boot-db41d65a97f335167e1fbc0400a83333b5157703.tar.gz
u-boot-db41d65a97f335167e1fbc0400a83333b5157703.tar.xz
u-boot-db41d65a97f335167e1fbc0400a83333b5157703.zip
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/hang.h')
-rw-r--r--include/hang.h22
1 files changed, 22 insertions, 0 deletions
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