aboutsummaryrefslogtreecommitdiff
path: root/usrsctplib/user_environment.h
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@fh-muenster.de>2017-11-04 20:09:45 +0100
committerMichael Tuexen <tuexen@fh-muenster.de>2017-11-04 20:09:45 +0100
commitcc025a5e33e5b245e6460321ffabd1027310cc47 (patch)
tree7c729cdcbd5957194030027a937115e64af2f1ea /usrsctplib/user_environment.h
parente0e1c2ee38b6e9cf143190f37f7bc87cf4c169c1 (diff)
downloadusrsctp-cc025a5e33e5b245e6460321ffabd1027310cc47.tar.gz
Print function from which panic() is called.
Diffstat (limited to 'usrsctplib/user_environment.h')
-rwxr-xr-xusrsctplib/user_environment.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/usrsctplib/user_environment.h b/usrsctplib/user_environment.h
index 306ff6b5..6e37d07c 100755
--- a/usrsctplib/user_environment.h
+++ b/usrsctplib/user_environment.h
@@ -94,17 +94,18 @@ terminate_non_graceful(void) {
abort();
}
-#define panic(...) \
- do { \
- SCTP_PRINTF(__VA_ARGS__);\
- SCTP_PRINTF("\n"); \
- terminate_non_graceful();\
+#define panic(...) \
+ do { \
+ SCTP_PRINTF("%s(): ", __FUNCTION__);\
+ SCTP_PRINTF(__VA_ARGS__); \
+ SCTP_PRINTF("\n"); \
+ terminate_non_graceful(); \
} while (0)
#define KASSERT(cond, args) \
do { \
if (!(cond)) { \
- panic args ;\
+ panic args ; \
} \
} while (0)
#else