fix warnings introduced by changes in _Assert_Exit_ macro
This commit is contained in:
@@ -595,7 +595,7 @@ function main() {
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
|
||||
if [ $UE_ip -eq 1 ]
|
||||
if [ "$UE_ip" = 1 ]
|
||||
then
|
||||
echo_info "Building ue_ip module"
|
||||
compilations $BUILD_DIR ue_ip
|
||||
|
||||
+13
-12
@@ -30,19 +30,20 @@
|
||||
#include <platform_types.h>
|
||||
#include "backtrace.h"
|
||||
|
||||
#define EXIT_NORMAL 0
|
||||
#define EXIT_ASSERT 1
|
||||
#define OAI_EXIT_NORMAL 0
|
||||
#define OAI_EXIT_ASSERT 1
|
||||
|
||||
#define _Assert_Exit_ \
|
||||
if (getenv("gdbStacks")) { \
|
||||
char tmp[1000]; \
|
||||
sprintf(tmp, "gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
|
||||
__attribute__((unused)) int dummy = system(tmp); \
|
||||
} \
|
||||
fprintf(stderr, "\nExiting execution\n"); \
|
||||
fflush(stdout); \
|
||||
fflush(stderr); \
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", EXIT_ASSERT);
|
||||
#define _Assert_Exit_ \
|
||||
if (getenv("gdbStacks")) { \
|
||||
char tmp [1000]; \
|
||||
sprintf(tmp,"gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
|
||||
__attribute__((unused)) int dummy=system(tmp); \
|
||||
} \
|
||||
fprintf(stderr, "\nExiting execution\n"); \
|
||||
fflush(stdout); \
|
||||
fflush(stderr); \
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", OAI_EXIT_ASSERT); \
|
||||
abort(); // to avoid gcc warnings - never executed unless app-specific exit_function() does not exit() nor abort()
|
||||
|
||||
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
||||
do { \
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ typedef struct protocol_ctxt_s {
|
||||
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||
|
||||
#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", EXIT_NORMAL)
|
||||
#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", OAI_EXIT_NORMAL)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -789,7 +789,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
|
||||
recPlay->nbSamplesBlocks++;
|
||||
LOG_D(HW,"recorded %d samples, for TS %lu, shift in buffer %ld nbBytes %d nbSamplesBlocks %d\n", nsamps, hdr->ts, recPlay->currentPtr-(uint8_t *)recPlay->ms_sample, (int)hdr->nbBytes, (int)recPlay->nbSamplesBlocks);
|
||||
} else
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__, "Recording reaches max iq limit\n", EXIT_NORMAL);
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__, "Recording reaches max iq limit\n", OAI_EXIT_NORMAL);
|
||||
}
|
||||
read_count++;
|
||||
LOG_D(HW,"usrp_lib: returning %d samples at ts %lu read_count %d\n", samples_received, *ptimestamp, read_count);
|
||||
|
||||
@@ -268,7 +268,7 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
|
||||
if (s->wrap_count == device->openair0_cfg->recplay_conf->u_sf_loops) {
|
||||
LOG_W(HW, "iqplayer device terminating subframes replay after %u iteration\n",
|
||||
device->openair0_cfg->recplay_conf->u_sf_loops);
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__,"replay ended, triggering process termination\n", EXIT_NORMAL);
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__,"replay ended, triggering process termination\n", OAI_EXIT_NORMAL);
|
||||
}
|
||||
|
||||
if (s->wrap_count > 0) {
|
||||
|
||||
Reference in New Issue
Block a user