Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 1 | #ifndef OSMOCORE_PANIC_H |
| 2 | #define OSMOCORE_PANIC_H |
| 3 | |
Harald Welte | a523d14 | 2011-08-17 16:09:19 +0200 | [diff] [blame] | 4 | /*! \addtogroup utils |
| 5 | * @{ |
| 6 | */ |
| 7 | |
| 8 | /*! \file panic.h */ |
| 9 | |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 10 | #include <stdarg.h> |
| 11 | |
Harald Welte | a523d14 | 2011-08-17 16:09:19 +0200 | [diff] [blame] | 12 | /*! \brief panic handler callback function type */ |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 13 | typedef void (*osmo_panic_handler_t)(const char *fmt, va_list args); |
| 14 | |
Pablo Neira Ayuso | 240f01c | 2011-04-26 03:07:46 +0200 | [diff] [blame] | 15 | extern void osmo_panic(const char *fmt, ...); |
| 16 | extern void osmo_set_panic_handler(osmo_panic_handler_t h); |
Sylvain Munaut | ac3e61a | 2010-07-25 18:08:54 +0200 | [diff] [blame] | 17 | |
Harald Welte | a523d14 | 2011-08-17 16:09:19 +0200 | [diff] [blame] | 18 | /*! @} */ |
| 19 | |
| 20 | #endif /* OSMOCORE_PANIC_H */ |