mirror of https://gerrit.osmocom.org/libosmocore
doxygen: document panic.[ch]
This commit is contained in:
parent
9327c6dc0f
commit
a523d14096
|
@ -1,11 +1,20 @@
|
||||||
#ifndef OSMOCORE_PANIC_H
|
#ifndef OSMOCORE_PANIC_H
|
||||||
#define OSMOCORE_PANIC_H
|
#define OSMOCORE_PANIC_H
|
||||||
|
|
||||||
|
/*! \addtogroup utils
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file panic.h */
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
/*! \brief panic handler callback function type */
|
||||||
typedef void (*osmo_panic_handler_t)(const char *fmt, va_list args);
|
typedef void (*osmo_panic_handler_t)(const char *fmt, va_list args);
|
||||||
|
|
||||||
extern void osmo_panic(const char *fmt, ...);
|
extern void osmo_panic(const char *fmt, ...);
|
||||||
extern void osmo_set_panic_handler(osmo_panic_handler_t h);
|
extern void osmo_set_panic_handler(osmo_panic_handler_t h);
|
||||||
|
|
||||||
#endif
|
/*! @} */
|
||||||
|
|
||||||
|
#endif /* OSMOCORE_PANIC_H */
|
||||||
|
|
|
@ -20,6 +20,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \addtogroup utils
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file panic.c */
|
||||||
|
|
||||||
#include <osmocom/gsm/gsm_utils.h>
|
#include <osmocom/gsm/gsm_utils.h>
|
||||||
#include <osmocom/core/panic.h>
|
#include <osmocom/core/panic.h>
|
||||||
#include <osmocom/core/backtrace.h>
|
#include <osmocom/core/backtrace.h>
|
||||||
|
@ -52,6 +58,7 @@ static void osmo_panic_default(const char *fmt, va_list args)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*! \brief Terminate the current program with a panic */
|
||||||
void osmo_panic(const char *fmt, ...)
|
void osmo_panic(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
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)
|
void osmo_set_panic_handler(osmo_panic_handler_t h)
|
||||||
{
|
{
|
||||||
osmo_panic_handler = h;
|
osmo_panic_handler = h;
|
||||||
|
|
Loading…
Reference in New Issue