blob: 28519a854a7786f545564d14b71e8cf7782c7506 [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001#ifndef AOS_COMMON_DIE_H_
2#define AOS_COMMON_DIE_H_
3
4#include <stdarg.h>
5
6namespace aos {
7
8// Terminates the task/process and logs a message (without using the logging
9// framework). Designed for use in code that can't use the logging framework
10// (code that can should LOG(FATAL), which calls this).
11void Die(const char *format, ...)
12 __attribute__((noreturn))
13 __attribute__((format(gnu_printf, 1, 2)));
14void VDie(const char *format, va_list args)
15 __attribute__((noreturn))
16 __attribute__((format(gnu_printf, 1, 0)));
17
18} // namespace aos
19
20#endif // AOS_COMMON_DIE_H_