aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-08-17 16:09:19 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-17 17:14:12 +0200
commita523d14096f767a736dac30d551ca1d1f0359347 (patch)
treeb06d5a2eb6ee918a4b4810a7e8d9a3046b755374
parent9327c6dc0f9bb5c16ecd665651fa3463175653a0 (diff)
doxygen: document panic.[ch]
-rw-r--r--include/osmocom/core/panic.h11
-rw-r--r--src/panic.c8
2 files changed, 18 insertions, 1 deletions
diff --git a/include/osmocom/core/panic.h b/include/osmocom/core/panic.h
index c28a8440..fd5cf208 100644
--- a/include/osmocom/core/panic.h
+++ b/include/osmocom/core/panic.h
@@ -1,11 +1,20 @@
#ifndef OSMOCORE_PANIC_H
#define OSMOCORE_PANIC_H
+/*! \addtogroup utils
+ * @{
+ */
+
+/*! \file panic.h */
+
#include <stdarg.h>
+/*! \brief panic handler callback function type */
typedef void (*osmo_panic_handler_t)(const char *fmt, va_list args);
extern void osmo_panic(const char *fmt, ...);
extern void osmo_set_panic_handler(osmo_panic_handler_t h);
-#endif
+/*! @} */
+
+#endif /* OSMOCORE_PANIC_H */
diff --git a/src/panic.c b/src/panic.c
index d4452264..be644ff1 100644
--- a/src/panic.c
+++ b/src/panic.c
@@ -20,6 +20,12 @@
*
*/
+/*! \addtogroup utils
+ * @{
+ */
+
+/*! \file panic.c */
+
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/panic.h>
#include <osmocom/core/backtrace.h>
@@ -52,6 +58,7 @@ static void osmo_panic_default(const char *fmt, va_list args)
#endif
+/*! \brief Terminate the current program with a panic */
void osmo_panic(const char *fmt, ...)
{
va_list args;
@@ -67,6 +74,7 @@ void osmo_panic(const char *fmt, ...)
}
+/*! \brief Set the panic handler */
void osmo_set_panic_handler(osmo_panic_handler_t h)
{
osmo_panic_handler = h;