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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
spbro
OpenXG-RAN
Commits
ea192180
Commit
ea192180
authored
Apr 19, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/clang-run-warning-memsan' into integration_2024_w16
parents
219b4b76
593191b5
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
50 additions
and
104 deletions
+50
-104
CMakeLists.txt
CMakeLists.txt
+8
-3
cmake_targets/build_oai
cmake_targets/build_oai
+0
-2
cmake_targets/tools/memsan.patch
cmake_targets/tools/memsan.patch
+0
-53
common/config/libconfig/config_libconfig.c
common/config/libconfig/config_libconfig.c
+11
-14
common/utils/T/DOC/T/howto_new_trace.patch
common/utils/T/DOC/T/howto_new_trace.patch
+1
-1
common/utils/T/tracer/enb.c
common/utils/T/tracer/enb.c
+1
-1
common/utils/T/tracer/event.c
common/utils/T/tracer/event.c
+1
-1
common/utils/T/tracer/extract.c
common/utils/T/tracer/extract.c
+1
-1
common/utils/T/tracer/extract_config.c
common/utils/T/tracer/extract_config.c
+1
-1
common/utils/T/tracer/extract_input_subframe.c
common/utils/T/tracer/extract_input_subframe.c
+1
-1
common/utils/T/tracer/extract_output_subframe.c
common/utils/T/tracer/extract_output_subframe.c
+1
-1
common/utils/T/tracer/gnb.c
common/utils/T/tracer/gnb.c
+1
-1
common/utils/T/tracer/hacks/dump_nack_signal.c
common/utils/T/tracer/hacks/dump_nack_signal.c
+1
-1
common/utils/T/tracer/hacks/multi-rru-clean.c
common/utils/T/tracer/hacks/multi-rru-clean.c
+1
-1
common/utils/T/tracer/hacks/time_meas.c
common/utils/T/tracer/hacks/time_meas.c
+1
-1
common/utils/T/tracer/logger/textlog.c
common/utils/T/tracer/logger/textlog.c
+4
-4
common/utils/T/tracer/macpdu2wireshark.c
common/utils/T/tracer/macpdu2wireshark.c
+1
-1
common/utils/T/tracer/multi.c
common/utils/T/tracer/multi.c
+2
-2
common/utils/T/tracer/record.c
common/utils/T/tracer/record.c
+1
-1
common/utils/T/tracer/replay.c
common/utils/T/tracer/replay.c
+1
-1
common/utils/T/tracer/textlog.c
common/utils/T/tracer/textlog.c
+1
-1
common/utils/T/tracer/to_vcd.c
common/utils/T/tracer/to_vcd.c
+1
-1
common/utils/T/tracer/ue.c
common/utils/T/tracer/ue.c
+1
-1
common/utils/T/tracer/vcd.c
common/utils/T/tracer/vcd.c
+1
-1
common/utils/T/tracer/view/ticktime.c
common/utils/T/tracer/view/ticktime.c
+1
-2
common/utils/T/tracer/view/time.c
common/utils/T/tracer/view/time.c
+1
-2
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+2
-2
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-1
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+1
-1
No files found.
CMakeLists.txt
View file @
ea192180
...
...
@@ -158,11 +158,16 @@ endif()
# add autotools definitions that were maybe used!
add_definitions
(
"-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP"
)
set
(
commonOpts
"-pipe -fPIC -Wall -fno-strict-aliasing"
)
# we need -rdynamic to incorporate all symbols in shared objects, see man page
set
(
commonOpts
"-pipe -fPIC -Wall -fno-strict-aliasing -rdynamic"
)
# GNU C/C++ Compiler might throw many warnings without packed-bitfield-compat, see man page
# also, we need -rdynamic to incorporate all symbols in shared objects, again, see man page
if
(
CMAKE_C_COMPILER_ID STREQUAL
"GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
set
(
commonOpts
"
${
commonOpts
}
-Wno-packed-bitfield-compat -rdynamic"
)
set
(
commonOpts
"
${
commonOpts
}
-Wno-packed-bitfield-compat"
)
endif
()
# clang: suppress complaints about unused command line argument (-rdynamic only
# used during linking)
if
(
CMAKE_C_COMPILER_ID STREQUAL
"Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
set
(
commonOpts
"
${
commonOpts
}
-Wno-unused-command-line-argument"
)
endif
()
set
(
CMAKE_C_FLAGS
...
...
cmake_targets/build_oai
View file @
ea192180
...
...
@@ -418,8 +418,6 @@ function main() {
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_UNDEFINED=True"
shift
;;
--sanitize-memory
|
-fsanitize
=
memory
)
echo_warning
"Note: memory sanitizer
\n
* requires clang (tested: v17)
\n
* is incompatible with address/undefined behavior sanitizer
\n
* requires cmake_targets/tools/memsan.patch"
sleep
2
CMAKE_CMD
=
"
$CMAKE_CMD
-DSANITIZE_MEMORY=ON -DSANITIZE_ADDRESS=OFF -DSANITIZE_UNDEFINED=OFF"
shift
;;
--trace-asn1c-enc-dec
)
...
...
cmake_targets/tools/memsan.patch
deleted
100644 → 0
View file @
219b4b76
commit bf7f0c4f0f1bfce586667b50050640b67a7a747a
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date: Wed Jun 7 18:24:50 2023 +0200
Fix dlopen() linker errors in dfts, ldpc, ldpc_parityCheck, and params_libconfig
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c29105d503..3b9e7d1246 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -508,7 +508,7 @@
add_library(CONFIG_LIB
)
target_link_libraries(CONFIG_LIB PRIVATE dl UTIL)
add_library(params_libconfig MODULE ${CONFIG_ROOTDIR}/libconfig/config_libconfig.c)
-target_link_libraries(params_libconfig config)
+target_link_libraries(params_libconfig config CONFIG_LIB minimal_lib)
# shared library loader
set (SHLIB_LOADER_SOURCES
${OPENAIR_DIR}/common/utils/load_module_shlib.c
@@ -1018,16 +1018,19 @@
if (ENABLE_LDPC_CUDA)
endif()
endif()
-add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
+add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} ${OPENAIR1_DIR}/PHY/CODING/crc_byte.c)
target_link_libraries(ldpc PRIVATE ldpc_gen_HEADERS)
+target_link_libraries(ldpc PRIVATE UTIL)
add_library(ldpc_parityCheck MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
target_compile_definitions(ldpc_parityCheck PUBLIC NR_LDPC_ENABLE_PARITY_CHECK)
target_link_libraries(ldpc_parityCheck PRIVATE ldpc_gen_HEADERS)
+target_link_libraries(ldpc_parityCheck PRIVATE UTIL minimal_lib)
add_library(coding MODULE ${PHY_TURBOSRC} )
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
+target_link_libraries(dfts PRIVATE minimal_lib)
set(PHY_SRC_COMMON
diff --git a/common/utils/minimal_stub.c b/common/utils/minimal_stub.c
index be9c1b399d..7ad0df4d56 100644
--- a/common/utils/minimal_stub.c
+++ b/common/utils/minimal_stub.c
@@ -1,6 +1,8 @@
+#include <stdlib.h>
#ifndef T_TRACER
int T_stdout;
#endif
+int oai_exit = 0;
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
common/config/libconfig/config_libconfig.c
View file @
ea192180
...
...
@@ -322,19 +322,16 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
int
config_libconfig_get
(
configmodule_interface_t
*
cfg
,
paramdef_t
*
cfgoptions
,
int
numoptions
,
char
*
prefix
)
{
config_setting_t
*
setting
;
char
*
str
;
int
i
,
u
;
long
long
int
llu
;
double
dbl
;
int
rst
;
int
status
=
0
;
int
notfound
;
int
defval
;
int
fatalerror
=
0
;
int
numdefvals
=
0
;
char
*
str
=
NULL
;
int
u
=
0
;
long
long
int
llu
=
0
;
double
dbl
=
0
.
0
f
;
int
status
=
0
;
int
fatalerror
=
0
;
int
numdefvals
=
0
;
char
cfgpath
[
512
];
/* 512 should be enough for the sprintf below */
for
(
i
=
0
;
i
<
numoptions
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
numoptions
;
i
++
)
{
if
(
prefix
!=
NULL
)
{
sprintf
(
cfgpath
,
"%s.%s"
,
prefix
,
cfgoptions
[
i
].
optname
);
}
else
{
...
...
@@ -346,8 +343,8 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
continue
;
}
notfound
=
0
;
defval
=
0
;
int
notfound
=
0
;
int
defval
=
0
;
switch
(
cfgoptions
[
i
].
type
)
{
case
TYPE_STRING
:
...
...
@@ -436,7 +433,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
if
(
!
config_lookup_string
(
&
(
libconfig_privdata
.
cfg
),
cfgpath
,
(
const
char
**
)
&
str
))
{
defval
=
config_setdefault_ipv4addr
(
cfg
,
&
(
cfgoptions
[
i
]),
prefix
);
}
else
{
rst
=
config_assign_ipv4addr
(
cfg
,
cfgoptions
,
str
);
int
rst
=
config_assign_ipv4addr
(
cfg
,
cfgoptions
,
str
);
if
(
rst
<
0
)
{
fprintf
(
stderr
,
"[LIBCONFIG] %s not valid for %s
\n
"
,
str
,
cfgpath
);
...
...
common/utils/T/DOC/T/howto_new_trace.patch
View file @
ea192180
...
...
@@ -164,7 +164,7 @@ index 0000000000..00baf34774
+ }
+
+ /* a buffer needed to receive events from the nr-softmodem */
+ OBUF ebuf = {
osize: 0, omaxsize: 0, obuf:
NULL };
+ OBUF ebuf = {
.osize = 0, .omaxsize = 0, .obuf =
NULL };
+
+ /* read events */
+ while (1) {
...
...
common/utils/T/tracer/enb.c
View file @
ea192180
...
...
@@ -874,7 +874,7 @@ int main(int n, char **v)
if
(
pthread_mutex_init
(
&
enb_data
.
lock
,
NULL
))
abort
();
setup_event_selector
(
g
,
database
,
is_on
,
is_on_changed
,
&
enb_data
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
restart:
clear_remote_config
();
...
...
common/utils/T/tracer/event.c
View file @
ea192180
...
...
@@ -49,7 +49,7 @@ again:
#endif
read_error:
return
(
event
){
type
:
-
1
};
return
(
event
){
.
type
=
-
1
};
}
#ifdef T_SEND_TIME
...
...
common/utils/T/tracer/extract.c
View file @
ea192180
...
...
@@ -113,7 +113,7 @@ int main(int n, char **v)
found
=
0
;
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
event
e
;
...
...
common/utils/T/tracer/extract_config.c
View file @
ea192180
...
...
@@ -36,7 +36,7 @@ int main(int n, char **v)
in
=
fopen
(
input_filename
,
"r"
);
if
(
in
==
NULL
)
{
perror
(
input_filename
);
abort
();
}
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
int
type
;
...
...
common/utils/T/tracer/extract_input_subframe.c
View file @
ea192180
...
...
@@ -104,7 +104,7 @@ err:
fd
=
open
(
file
,
O_RDONLY
);
if
(
fd
==
-
1
)
{
perror
(
file
);
exit
(
1
);
}
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* get wanted frame/subframe */
while
(
1
)
{
...
...
common/utils/T/tracer/extract_output_subframe.c
View file @
ea192180
...
...
@@ -101,7 +101,7 @@ err:
int
last_subframe
=
-
1
;
int
subframe_written
=
0
;
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
event
e
;
...
...
common/utils/T/tracer/gnb.c
View file @
ea192180
...
...
@@ -265,7 +265,7 @@ int main(int n, char **v)
gnb_main_gui
(
&
eg
,
g
,
h
,
database
,
&
gnb_data
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
restart:
clear_remote_config
();
...
...
common/utils/T/tracer/hacks/dump_nack_signal.c
View file @
ea192180
...
...
@@ -85,7 +85,7 @@ int main(int n, char **v) {
socket_send
(
socket
,
is_on
,
number_of_events
*
sizeof
(
int
))
==
-
1
)
abort
();
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
char
dump
[
10
][
T_BUFFER_MAX
];
event
dump_ev
[
10
];
FILE
*
z
=
fopen
(
"/tmp/dd"
,
"w"
);
...
...
common/utils/T/tracer/hacks/multi-rru-clean.c
View file @
ea192180
...
...
@@ -145,7 +145,7 @@ int main(int n, char **v)
clear_cache
(
number_of_tags
,
cache
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
int
type
;
...
...
common/utils/T/tracer/hacks/time_meas.c
View file @
ea192180
...
...
@@ -86,7 +86,7 @@ int main(int n, char **v)
socket_send
(
socket
,
is_on
,
number_of_events
*
sizeof
(
int
))
==
-
1
)
abort
();
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
event
e
;
...
...
common/utils/T/tracer/logger/textlog.c
View file @
ea192180
...
...
@@ -131,7 +131,7 @@ static struct chunk next_chunk(char **s, database_event_format f)
cur
++
;
*
s
=
cur
;
if
(
find_argument
(
name
,
f
,
&
it
,
&
event_arg
)
==
0
)
goto
error
;
return
(
struct
chunk
){
type
:
C_ARG_NAME
,
s
:
name
,
it
:
it
,
event_arg
:
event_arg
};
return
(
struct
chunk
){
.
type
=
C_ARG_NAME
,
.
s
=
name
,
.
it
=
it
,
.
event_arg
=
event_arg
};
}
/* { } is name of event (anything in between is smashed) */
...
...
@@ -143,7 +143,7 @@ static struct chunk next_chunk(char **s, database_event_format f)
*
cur
=
0
;
cur
++
;
*
s
=
cur
;
return
(
struct
chunk
){
type
:
C_EVENT_NAME
};
return
(
struct
chunk
){
.
type
=
C_EVENT_NAME
};
}
/* anything but [ and { is raw string */
...
...
@@ -151,10 +151,10 @@ static struct chunk next_chunk(char **s, database_event_format f)
name
=
cur
;
while
(
*
cur
&&
*
cur
!=
'['
&&
*
cur
!=
'{'
)
cur
++
;
*
s
=
cur
;
return
(
struct
chunk
){
type
:
C_STRING
,
s
:
name
};
return
(
struct
chunk
){
.
type
=
C_STRING
,
.
s
=
name
};
error:
return
(
struct
chunk
){
type
:
C_ERROR
};
return
(
struct
chunk
){
.
type
=
C_ERROR
};
}
logger
*
new_textlog
(
event_handler
*
h
,
void
*
database
,
...
...
common/utils/T/tracer/macpdu2wireshark.c
View file @
ea192180
...
...
@@ -808,7 +808,7 @@ int main(int n, char **v)
d
.
to
.
sin_port
=
htons
(
port
);
d
.
to
.
sin_addr
.
s_addr
=
inet_addr
(
ip
);
new_thread
(
receiver
,
&
d
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* read messages */
while
(
1
)
{
...
...
common/utils/T/tracer/multi.c
View file @
ea192180
...
...
@@ -52,7 +52,7 @@ int send_messages_txt(int s, char *T_messages_txt, int T_messages_txt_len)
/* TODO: be careful, we use internal T stuff, to rewrite? */
T_LOCAL_size
=
0
;
T_HEADER
(
T_ID
(
-
1
));
T_PUT_buffer
(
1
,
((
T_buffer
){
addr
:
(
src
),
length
:
(
send_size
)
}));
T_PUT_buffer
(
1
,
((
T_buffer
){
.
addr
=
src
,
.
length
=
send_size
}));
if
(
socket_send
(
s
,
&
T_LOCAL_size
,
4
)
==
-
1
)
return
-
1
;
if
(
socket_send
(
s
,
buf
,
T_LOCAL_size
)
==
-
1
)
return
-
1
;
src
+=
send_size
;
...
...
@@ -242,7 +242,7 @@ int main(int n, char **v)
/* create listener socket */
l
=
create_listen_socket
(
"0.0.0.0"
,
local_port
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
current_nfd
=
0
;
...
...
common/utils/T/tracer/record.c
View file @
ea192180
...
...
@@ -123,7 +123,7 @@ int main(int n, char **v)
if
(
signal
(
SIGINT
,
force_stop
)
==
SIG_ERR
)
abort
();
if
(
signal
(
SIGTSTP
,
force_stop
)
==
SIG_ERR
)
abort
();
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* read messages */
while
(
run
)
{
...
...
common/utils/T/tracer/replay.c
View file @
ea192180
...
...
@@ -136,7 +136,7 @@ int main(int n, char **v)
new_thread
(
get_message_thread
,
&
socket
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
while
(
1
)
{
int
type
;
...
...
common/utils/T/tracer/textlog.c
View file @
ea192180
...
...
@@ -130,7 +130,7 @@ int main(int n, char **v)
/* send the first message - activate selected traces */
activate_traces
(
socket
,
is_on
,
number_of_events
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* read messages */
while
(
1
)
{
...
...
common/utils/T/tracer/to_vcd.c
View file @
ea192180
...
...
@@ -366,7 +366,7 @@ int main(int n, char **v)
if
(
signal
(
SIGINT
,
force_stop
)
==
SIG_ERR
)
abort
();
if
(
signal
(
SIGTSTP
,
force_stop
)
==
SIG_ERR
)
abort
();
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* read messages */
while
(
run
)
{
...
...
common/utils/T/tracer/ue.c
View file @
ea192180
...
...
@@ -758,7 +758,7 @@ int main(int n, char **v)
if
(
pthread_mutex_init
(
&
ue_data
.
lock
,
NULL
))
abort
();
setup_event_selector
(
g
,
database
,
is_on
,
is_on_changed
,
&
ue_data
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
restart:
clear_remote_config
();
...
...
common/utils/T/tracer/vcd.c
View file @
ea192180
...
...
@@ -187,7 +187,7 @@ int main(int n, char **v)
/* send the first message - activate selected traces */
is_on_changed
(
&
vcd_data
);
OBUF
ebuf
=
{
osize
:
0
,
omaxsize
:
0
,
obuf
:
NULL
};
OBUF
ebuf
=
{
.
osize
=
0
,
.
omaxsize
=
0
,
.
obuf
=
NULL
};
/* read messages */
while
(
1
)
{
...
...
common/utils/T/tracer/view/ticktime.c
View file @
ea192180
...
...
@@ -129,8 +129,7 @@ static void *ticktime_thread(void *_this)
pixel_length
=
this
->
pixel_length
;
if
(
this
->
autoscroll
)
{
tnext
=
time_add
(
this
->
latest_time
,
(
struct
timespec
){
tv_sec
:
0
,
tv_nsec
:
1
});
tnext
=
time_add
(
this
->
latest_time
,
(
struct
timespec
){.
tv_sec
=
0
,
.
tv_nsec
=
1
});
tstart
=
time_sub
(
tnext
,
nano_to_time
(
pixel_length
*
width
));
this
->
start_time
=
tstart
;
}
else
{
...
...
common/utils/T/tracer/view/time.c
View file @
ea192180
...
...
@@ -122,8 +122,7 @@ static void *time_thread(void *_this)
pixel_length
=
this
->
pixel_length
;
if
(
this
->
autoscroll
)
{
tnext
=
time_add
(
this
->
latest_time
,
(
struct
timespec
){
tv_sec
:
0
,
tv_nsec
:
1
});
tnext
=
time_add
(
this
->
latest_time
,
(
struct
timespec
){.
tv_sec
=
0
,
.
tv_nsec
=
1
});
tstart
=
time_sub
(
tnext
,
nano_to_time
(
pixel_length
*
width
));
this
->
start_time
=
tstart
;
}
else
{
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
ea192180
...
...
@@ -391,8 +391,8 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
// this code packs the one bit per byte of G_N into a packed bits G_N_tab
for
(
int
i
=
0
;
i
<
polarParams
->
N
;
i
++
)
{
for
(
int
j
=
0
;
j
<
polarParams
->
N
;
j
+=
64
)
{
const
simde__m256i
tmp1
=
simde_mm256_cmpgt_epi8
(
*
(
simde__m256i
*
)
&
polarParams
->
G_N
[
i
][
j
]
,
zeros
);
const
simde__m256i
tmp2
=
simde_mm256_cmpgt_epi8
(
*
(
simde__m256i
*
)
&
polarParams
->
G_N
[
i
][
j
+
32
]
,
zeros
);
const
simde__m256i
tmp1
=
simde_mm256_cmpgt_epi8
(
simde_mm256_loadu_si256
((
simde__m256i
*
)
&
polarParams
->
G_N
[
i
][
j
])
,
zeros
);
const
simde__m256i
tmp2
=
simde_mm256_cmpgt_epi8
(
simde_mm256_loadu_si256
((
simde__m256i
*
)
&
polarParams
->
G_N
[
i
][
j
+
32
])
,
zeros
);
// cast directly to uint64_t from int32_t propagates the sign bit (in gcc)
const
uint32_t
part1
=
simde_mm256_movemask_epi8
(
tmp1
);
const
uint32_t
part2
=
simde_mm256_movemask_epi8
(
tmp2
);
...
...
openair1/PHY/INIT/nr_init.c
View file @
ea192180
...
...
@@ -184,8 +184,9 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
AssertFatal
(
pdsch_dmrs
[
slot
][
symb
]
!=
NULL
,
"NR init: pdsch_dmrs for slot %d symbol %d - malloc failed
\n
"
,
slot
,
symb
);
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
{
pdsch_dmrs
[
slot
][
symb
][
q
]
=
(
uint32_t
*
)
malloc16
(
pdsch_dmrs_init_length
*
sizeof
(
uint32_t
));
pdsch_dmrs
[
slot
][
symb
][
q
]
=
malloc16
(
pdsch_dmrs_init_length
*
sizeof
(
uint32_t
));
AssertFatal
(
pdsch_dmrs
[
slot
][
symb
][
q
]
!=
NULL
,
"NR init: pdsch_dmrs for slot %d symbol %d nscid %d - malloc failed
\n
"
,
slot
,
symb
,
q
);
memset
(
pdsch_dmrs
[
slot
][
symb
][
q
],
0
,
sizeof
(
uint32_t
)
*
pdsch_dmrs_init_length
);
}
}
}
...
...
radio/rfsimulator/simulator.c
View file @
ea192180
...
...
@@ -179,7 +179,7 @@ typedef struct {
static
int
allocCirBuf
(
rfsimulator_state_t
*
bridge
,
int
sock
)
{
buffer_t
*
ptr
=&
bridge
->
buf
[
sock
];
ptr
->
circularBuf
=
malloc
(
sampleToByte
(
CirSize
,
1
));
ptr
->
circularBuf
=
calloc
(
1
,
sampleToByte
(
CirSize
,
1
));
if
(
ptr
->
circularBuf
==
NULL
)
{
LOG_E
(
HW
,
"malloc(%lu) failed
\n
"
,
sampleToByte
(
CirSize
,
1
));
return
-
1
;
...
...
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