From 2d2e2cca0dc1d62addc9c9fcb3a59f343fc3baf6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 25 Apr 2016 12:11:20 +0200 Subject: Update doxygen annotations in libosmocore This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation. --- src/panic.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/panic.c') diff --git a/src/panic.c b/src/panic.c index 84bab33b..0ce50db2 100644 --- a/src/panic.c +++ b/src/panic.c @@ -24,7 +24,9 @@ * @{ */ -/*! \file panic.c */ +/*! \file panic.c + * \brief Routines for panic handling + */ #include #include @@ -58,7 +60,19 @@ static void osmo_panic_default(const char *fmt, va_list args) #endif -/*! \brief Terminate the current program with a panic */ +/*! \brief Terminate the current program with a panic + * + * You can call this function in case some severely unexpected situation + * is detected and the program is supposed to terminate in a way that + * reports the fact that it terminates. + * + * The application can register a panic handler function using \ref + * osmo_set_panic_handler. If it doesn't, a default panic handler + * function is called automatically. + * + * The default function on most systems will generate a backtrace and + * then abort() the process. + */ void osmo_panic(const char *fmt, ...) { va_list args; @@ -74,7 +88,12 @@ void osmo_panic(const char *fmt, ...) } -/*! \brief Set the panic handler */ +/*! \brief Set the panic handler + * \param[in] h New panic handler function + * + * This changes the panic handling function from the currently active + * function to a new call-back function supplied by the caller. + */ void osmo_set_panic_handler(osmo_panic_handler_t h) { osmo_panic_handler = h; -- cgit v1.2.3