unified VC4 and ARM runtime code (including C++ runtime), updated some minor bits
[rpi-open-firmware.git] / lib / panic.h
1 #pragma once
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 extern void panic(const char* fmt, ...)
8 __attribute__((noreturn))
9 __attribute__ ((format (printf, 1, 2)));
10
11 #define panic_plain(ex, ...) \
12 (panic)(ex, ## __VA_ARGS__)
13 #define __STRINGIFY(x) #x
14 #define LINE_NUMBER(x) __STRINGIFY(x)
15 #define PANIC_LOCATION __FILE__ ":" LINE_NUMBER(__LINE__)
16 #define panic(ex, ...) \
17 (panic)(# ex "@" PANIC_LOCATION, ## __VA_ARGS__)
18
19 #ifdef __cplusplus
20 }
21 #endif
This page took 0.088312 seconds and 4 git commands to generate.