fix warnings introduced by changes in _Assert_Exit_ macro

This commit is contained in:
Bruno Mongazon-Cazavet
2023-02-23 09:56:24 +01:00
parent fcc41355ea
commit 9db78ab4d6
9 changed files with 26 additions and 19 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
void nfapi_setmode(nfapi_mode_t nfapi_mode) { return; }
void exit_function(const char *file, const char *function, const int line, const char *s) {
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) {
if (s != NULL) {
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
+6
View File
@@ -40,6 +40,12 @@ RRC_release_list_t rrc_release_info;
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
if (assert) {
abort();
} else {
sleep(1); // allow other threads to exit first
exit(EXIT_SUCCESS);
}
}
nfapi_mode_t nfapi_mod = -1;
+1 -1
View File
@@ -288,7 +288,7 @@ void exit_function(const char *file, const char *function, const int line, const
if (assert) {
abort();
} else {
sleep(1); // allow lte-softmodem threads to exit first
sleep(1); // allow nr-softmodem threads to exit first
exit(EXIT_SUCCESS);
}
}
+1 -1
View File
@@ -215,7 +215,7 @@ void signal_handler(int sig) {
softmodem_printresources(sig,(telnet_printfunc_t)printf);
if (sig != SOFTMODEM_RTSIGNAL) {
printf("Linux signal %s...\n",strsignal(sig));
exit_function(__FILE__, __FUNCTION__, __LINE__, "softmodem starting exit procedure\n", EXIT_NORMAL);
exit_function(__FILE__, __FUNCTION__, __LINE__, "softmodem starting exit procedure\n", OAI_EXIT_NORMAL);
}
}
}