Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
d6d4d87e
Commit
d6d4d87e
authored
Aug 18, 2022
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review comments
parent
8b159d6d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
44 additions
and
32 deletions
+44
-32
common/config/config_cmdline.c
common/config/config_cmdline.c
+3
-1
common/config/config_load_configmodule.c
common/config/config_load_configmodule.c
+9
-2
common/config/config_userapi.c
common/config/config_userapi.c
+17
-15
common/config/libconfig/config_libconfig.c
common/config/libconfig/config_libconfig.c
+3
-1
common/utils/LOG/log.c
common/utils/LOG/log.c
+2
-2
common/utils/load_module_shlib.c
common/utils/load_module_shlib.c
+4
-0
common/utils/load_module_shlib.h
common/utils/load_module_shlib.h
+5
-5
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+0
-4
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+1
-2
No files found.
common/config/config_cmdline.c
View file @
d6d4d87e
...
...
@@ -54,7 +54,9 @@ int parse_stringlist(paramdef_t *cfgoptions, char *val) {
free
(
tmpval
);
AssertFatal
(
MAX_LIST_SIZE
>
numelt
,
""
);
AssertFatal
(
MAX_LIST_SIZE
>
numelt
,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d
\n
"
,
MAX_LIST_SIZE
);
config_check_valptr
(
cfgoptions
,
sizeof
(
char
*
),
numelt
);
cfgoptions
->
numelt
=
numelt
;
...
...
common/config/config_load_configmodule.c
View file @
d6d4d87e
...
...
@@ -339,7 +339,6 @@ void end_configmodule(void) {
pthread_mutex_lock
(
&
cfgptr
->
memBlocks_mutex
);
printf
(
"[CONFIG] free %u config value pointers
\n
"
,
cfgptr
->
numptrs
);
int
n
=
0
;
for
(
int
i
=
0
;
i
<
cfgptr
->
numptrs
;
i
++
)
{
if
(
cfgptr
->
oneBlock
[
i
].
ptrs
!=
NULL
&&
cfgptr
->
oneBlock
[
i
].
ptrsAllocated
==
true
&&
cfgptr
->
oneBlock
[
i
].
toFree
)
{
free
(
cfgptr
->
oneBlock
[
i
].
ptrs
);
...
...
@@ -349,6 +348,14 @@ void end_configmodule(void) {
cfgptr
->
numptrs
=
0
;
pthread_mutex_unlock
(
&
cfgptr
->
memBlocks_mutex
);
if
(
cfgptr
->
cfgmode
)
free
(
cfgptr
->
cfgmode
);
if
(
cfgptr
->
argv_info
)
free
(
cfgptr
->
argv_info
);
free
(
cfgptr
);
cfgptr
=
NULL
;
}
}
...
...
common/config/config_userapi.c
View file @
d6d4d87e
...
...
@@ -54,7 +54,9 @@ configmodule_interface_t *config_get_if(void) {
static
int
managed_ptr_sz
(
void
*
ptr
)
{
configmodule_interface_t
*
cfg
=
config_get_if
();
AssertFatal
(
cfg
->
numptrs
<
CONFIG_MAX_ALLOCATEDPTRS
,
""
);
AssertFatal
(
cfg
->
numptrs
<
CONFIG_MAX_ALLOCATEDPTRS
,
"This code use fixed size array as #define CONFIG_MAX_ALLOCATEDPTRS %d
\n
"
,
CONFIG_MAX_ALLOCATEDPTRS
);
int
i
;
pthread_mutex_lock
(
&
cfg
->
memBlocks_mutex
);
int
numptrs
=
cfg
->
numptrs
;
...
...
@@ -70,7 +72,7 @@ static int managed_ptr_sz(void* ptr) {
void
*
config_allocate_new
(
int
sz
,
bool
autoFree
)
{
void
*
ptr
=
calloc
(
sz
,
1
);
if
(
ptr
!=
NULL
)
{
AssertFatal
(
ptr
,
"calloc fails
\n
"
);
configmodule_interface_t
*
cfg
=
config_get_if
();
// add the memory piece in the managed memory pieces list
pthread_mutex_lock
(
&
cfg
->
memBlocks_mutex
);
...
...
@@ -81,8 +83,6 @@ void *config_allocate_new(int sz, bool autoFree) {
tmp
->
sz
=
sz
;
tmp
->
toFree
=
autoFree
;
pthread_mutex_unlock
(
&
cfg
->
memBlocks_mutex
);
}
else
AssertFatal
(
false
,
"calloc fails
\n
"
);
return
ptr
;
}
...
...
@@ -124,7 +124,9 @@ void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt) {
// difficult datamodel
cfgoptions
->
strptr
=
config_allocate_new
(
sizeof
(
*
cfgoptions
->
strptr
),
toFree
);
}
else
if
(
cfgoptions
->
type
==
TYPE_STRINGLIST
)
{
AssertFatal
(
nb_elt
<
MAX_LIST_SIZE
,
""
);
AssertFatal
(
nb_elt
<
MAX_LIST_SIZE
,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d
\n
"
,
MAX_LIST_SIZE
);
cfgoptions
->
strlistptr
=
config_allocate_new
(
sizeof
(
char
*
)
*
MAX_LIST_SIZE
,
toFree
);
for
(
int
i
=
0
;
i
<
MAX_LIST_SIZE
;
i
++
)
cfgoptions
->
strlistptr
[
i
]
=
config_allocate_new
(
DEFAULT_EXTRA_SZ
,
toFree
);
...
...
common/config/libconfig/config_libconfig.c
View file @
d6d4d87e
...
...
@@ -57,7 +57,9 @@ int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath
numelt
=
config_setting_length
(
setting
);
config_check_valptr
(
cfgoptions
,
sizeof
(
char
*
),
numelt
);
st
=
0
;
AssertFatal
(
MAX_LIST_SIZE
>
numelt
,
""
);
AssertFatal
(
MAX_LIST_SIZE
>
numelt
,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d
\n
"
,
MAX_LIST_SIZE
);
for
(
int
i
=
0
;
i
<
numelt
;
i
++
)
{
str
=
config_setting_get_string_elem
(
setting
,
i
);
...
...
common/utils/LOG/log.c
View file @
d6d4d87e
common/utils/load_module_shlib.c
View file @
d6d4d87e
...
...
@@ -281,5 +281,9 @@ void loader_reset()
shlib
->
numfunc
=
0
;
shlib
->
len_funcarray
=
0
;
}
if
(
loader_data
.
shlibpath
){
free
(
loader_data
.
shlibpath
);
loader_data
.
shlibpath
=
NULL
;
}
free
(
loader_data
.
shlibs
);
}
common/utils/load_module_shlib.h
View file @
d6d4d87e
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
d6d4d87e
...
...
@@ -659,10 +659,6 @@ int main(int argc, char **argv)
if
(
ouput_vcd
)
vcd_signal_dumper_close
();
end_configmodule
();
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[NR_DLSCHSIM] Error, configuration module init 2 failed
\n
"
);
}
logInit
();
loader_reset
();
logTerm
();
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
d6d4d87e
...
...
@@ -238,7 +238,6 @@ void mac_top_init_gNB(ngran_node_t node_type)
RC
.
nrmac
[
i
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
i
,
0
);
}
if
(
!
IS_SOFTMODEM_NOSTATS_BIT
)
threadCreate
(
&
RC
.
nrmac
[
i
]
->
stats_thread
,
nrmac_stats_thread
,
(
void
*
)
RC
.
nrmac
[
i
],
"MAC_STATS"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
)
+
1
);
mac_rrc_init
(
RC
.
nrmac
[
i
],
node_type
);
}
//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
...
...
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