diff options
author | Michael Tuexen <tuexen@fh-muenster.de> | 2017-11-04 20:09:45 +0100 |
---|---|---|
committer | Michael Tuexen <tuexen@fh-muenster.de> | 2017-11-04 20:09:45 +0100 |
commit | cc025a5e33e5b245e6460321ffabd1027310cc47 (patch) | |
tree | 7c729cdcbd5957194030027a937115e64af2f1ea /usrsctplib/user_environment.h | |
parent | e0e1c2ee38b6e9cf143190f37f7bc87cf4c169c1 (diff) | |
download | usrsctp-cc025a5e33e5b245e6460321ffabd1027310cc47.tar.gz |
Print function from which panic() is called.
Diffstat (limited to 'usrsctplib/user_environment.h')
-rwxr-xr-x | usrsctplib/user_environment.h | 13 |
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 |