Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dyyu
openairinterface5G
Commits
abbffef0
Commit
abbffef0
authored
Sep 05, 2018
by
Thomas Laurent
Browse files
fix some exit situations, that was badly done by SIGUSR1 handler
parent
c83fc1b5
Changes
13
Hide whitespace changes
Inline
Side-by-side
common/config/config_cmdline.c
View file @
abbffef0
...
...
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <platform_types.h>
#include "config_userapi.h"
...
...
common/config/config_userapi.c
View file @
abbffef0
...
...
@@ -37,8 +37,8 @@
#include <dlfcn.h>
#include <arpa/inet.h>
#include <platform_types.h>
#include "config_userapi.h"
extern
void
exit_fun
(
const
char
*
s
);
// lte-softmodem clean exit function
configmodule_interface_t
*
config_get_if
(
void
)
...
...
common/config/config_userapi.h
View file @
abbffef0
...
...
@@ -38,8 +38,6 @@
extern
"C"
{
#endif
/* get rid of "exit_fun undeclared" warning */
extern
void
exit_fun
(
const
char
*
s
);
#define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode )
#define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP )
...
...
common/utils/ocp_itti/intertask_interface.cpp
View file @
abbffef0
...
...
@@ -288,7 +288,7 @@ extern "C" {
void
itti_terminate_tasks
(
task_id_t
task_id
)
{
// Sends Terminate signals to all tasks.
itti_send_terminate_message
(
task_id
);
pthread_exit
(
NULL
);
usleep
(
100
*
1000
);
// Allow the tasks to receive the message before going returning to main thread
}
int
itti_init
(
task_id_t
task_max
,
thread_id_t
thread_max
,
MessagesIds
messages_id_max
,
const
task_info_t
*
tasks_info
,
...
...
common/utils/telnetsrv/telnetsrv_proccmd.c
View file @
abbffef0
...
...
@@ -302,8 +302,6 @@ char sv1[64];
}
int
proccmd_exit
(
char
*
buf
,
int
debug
,
telnet_printfunc_t
prnt
)
{
extern
void
exit_fun
(
const
char
*
s
);
if
(
debug
>
0
)
prnt
(
"process module received %s
\n
"
,
buf
);
...
...
openair1/PHY/defs_common.h
View file @
abbffef0
...
...
@@ -930,7 +930,6 @@ typedef enum {
#endif
void
exit_fun
(
const
char
*
s
);
#include "common/utils/LOG/log_extern.h"
extern
pthread_cond_t
sync_cond
;
...
...
openair1/SIMULATION/LTE_PHY/unitary_defs.h
View file @
abbffef0
...
...
@@ -22,7 +22,11 @@
openair0_device
openair0
;
volatile
int
oai_exit
=
0
;
void
exit_fun
(
const
char
*
s
)
{
exit
(
-
1
);
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
printf
(
"Exiting at: %s:%d %s(), %s
\n
"
,
file
,
line
,
function
,
msg
);
exit
(
-
1
);
}
extern
unsigned
int
dlsch_tbs25
[
27
][
25
],
TBStable
[
27
][
110
];
extern
unsigned
char
offset_mumimo_llr_drange_fix
;
...
...
openair2/COMMON/platform_types.h
View file @
abbffef0
...
...
@@ -285,4 +285,7 @@ typedef struct protocol_ctxt_s {
(CTXT_Pp)->rnti
#define CHECK_CTXT_ARGS(CTXT_Pp)
#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg)
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
);
#endif
openair2/ENB_APP/flexran_agent_common_internal.c
View file @
abbffef0
...
...
@@ -68,7 +68,7 @@ void handle_reconfiguration(mid_t mod_id)
if
(
restart_L1L2
(
mod_id
)
<
0
)
{
LOG_F
(
ENB_APP
,
"can not restart, killing lte-softmodem
\n
"
);
itti_terminate_tasks
(
TASK_PHY_ENB
);
exit_fun
(
"can not restart L1L2, killing lte-softmodem"
);
return
;
}
...
...
targets/RT/USER/lte-enb.c
View file @
abbffef0
...
...
@@ -141,7 +141,6 @@ static struct {
extern
double
cpuf
;
void
exit_fun
(
const
char
*
s
);
void
init_eNB
(
int
,
int
);
void
stop_eNB
(
int
nb_inst
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
abbffef0
...
...
@@ -319,13 +319,13 @@ void signal_handler(int sig) {
void
exit_fun
(
const
char
*
s
)
void
exit_fun
ction
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
ru_id
;
if
(
s
!=
NULL
)
{
printf
(
"%s %s() Exiting OAI softmodem: %s
\n
"
,
__FILE__
,
__FUNCTION__
,
s
);
printf
(
"%s
:%d
%s() Exiting OAI softmodem: %s
\n
"
,
file
,
line
,
function
,
s
);
}
oai_exit
=
1
;
...
...
@@ -345,11 +345,11 @@ void exit_fun(const char* s)
}
#if defined(ENABLE_ITTI)
sleep
(
1
);
//allow lte-softmodem threads to exit first
#if defined(ENABLE_ITTI)
itti_terminate_tasks
(
TASK_UNKNOWN
);
#endif
exit
(
1
);
}
...
...
targets/RT/USER/lte-softmodem.h
View file @
abbffef0
...
...
@@ -240,7 +240,6 @@ extern volatile int start_UE;
#include "threads_t.h"
extern
threads_t
threads
;
extern
void
exit_fun
(
const
char
*
s
);
// In lte-enb.c
extern
void
init_eNB
(
int
single_thread_flag
,
int
wait_for_sync
);
extern
void
stop_eNB
(
int
);
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
abbffef0
...
...
@@ -322,13 +322,13 @@ void signal_handler(int sig) {
void
exit_fun
(
const
char
*
s
)
void
exit_fun
ction
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
CC_id
;
logClean
();
if
(
s
!=
NULL
)
{
printf
(
"%s %s() Exiting OAI softmodem: %s
\n
"
,
__FILE__
,
__FUNCTION__
,
s
);
printf
(
"%s
:%d
%s() Exiting OAI softmodem: %s
\n
"
,
file
,
line
,
function
,
s
);
}
oai_exit
=
1
;
...
...
@@ -341,10 +341,11 @@ void exit_fun(const char* s)
PHY_vars_UE_g
[
0
][
CC_id
]
->
rfdevice
.
trx_end_func
(
&
PHY_vars_UE_g
[
0
][
CC_id
]
->
rfdevice
);
}
#if defined(ENABLE_ITTI)
sleep
(
1
);
//allow lte-softmodem threads to exit first
#if defined(ENABLE_ITTI)
itti_terminate_tasks
(
TASK_UNKNOWN
);
#endif
exit
(
1
);
}
#ifdef XFORMS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment