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
常顺宇
OpenXG-RAN
Commits
7b3615de
Commit
7b3615de
authored
Apr 10, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
bc53a9af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
24 deletions
+29
-24
common/utils/threadPool/Makefile
common/utils/threadPool/Makefile
+2
-2
common/utils/threadPool/thread-pool.c
common/utils/threadPool/thread-pool.c
+3
-0
executables/nr-ue.c
executables/nr-ue.c
+24
-22
No files found.
common/utils/threadPool/Makefile
View file @
7b3615de
all
:
measurement_display thread-pool-test
measurement_display
:
measurement_display.c thread-pool.h
gcc measurement_display.c
-I
/data/openairinterface5g.nr/common/utils/
-I
.
/data/openairinterface5g.nr
/common/utils/backtrace.c
-lpthread
-D
TEST_THREAD_POOL
-I
../LOG
-I
../../utils/T
-o
measurement_display
gcc measurement_display.c
-I
${OPENAIR_DIR}
/
-I
${OPENAIR_DIR}
/common/utils/
-I
.
${OPENAIR_DIR}
/common/utils/backtrace.c
-lpthread
-D
TEST_THREAD_POOL
-I
../LOG
-I
../../utils/T
-o
measurement_display
thread-pool-test
:
thread-pool.c thread-pool.h
gcc
-g
thread-pool.c
-I
/data/openairinterface5g.nr/common/utils/
-I
.
/data/openairinterface5g.nr/common/utils/backtrace.c
-lpthread
-D
TEST_THREAD_POOL
-I
../LOG
-I
../../utils/T
-o
thread-pool-test
gcc
-g
thread-pool.c
-I
${OPENAIR_DIR}
/
-I
${OPENAIR_DIR}
/common/utils/
-I
.
${OPENAIR_DIR}
/common/utils/backtrace.c
-I
${OPENAIR_DIR}
/openair2/COMMON
${OPENAIR_DIR}
/common/utils/LOG/log.c
${OPENAIR_DIR}
/common/config/config_userapi.c
${OPENAIR_DIR}
/common/config/config_load_configmodule.c
${OPENAIR_DIR}
/common/config/config_cmdline.c
-lpthread
-ldl
-D
TEST_THREAD_POOL
-I
../LOG
-I
../../utils/T
-o
thread-pool-test
common/utils/threadPool/thread-pool.c
View file @
7b3615de
...
...
@@ -151,6 +151,9 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
#ifdef TEST_THREAD_POOL
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
}
struct
testData
{
int
id
;
char
txt
[
30
];
...
...
executables/nr-ue.c
View file @
7b3615de
...
...
@@ -530,6 +530,7 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n");
return
1
;
}
return
0
;
}
...
...
@@ -605,6 +606,10 @@ void *UE_thread(void *arg) {
decoded_frame_rx
=
proc
->
decoded_frame_rx
;
// we do ++ first in the regular processing, so it will be 0;
absolute_slot
=
decoded_frame_rx
*
nb_slot_frame
+
nb_slot_frame
-
1
;
while
(
tryPullTpool
(
&
nf
,
Tpool
)
!=
NULL
)
{
};
continue
;
}
...
...
@@ -683,20 +688,6 @@ void *UE_thread(void *arg) {
UE
->
frame_parms
.
ofdm_symbol_size
-
UE
->
frame_parms
.
nb_prefix_samples0
;
notifiedFIFO_elt_t
*
res
;
if
(
getenv
(
"RFSIMULATOR"
))
{
// FixMe: Wait previous thread is done, because race conditions seems too bad
// in case of actual RF board, the overlap between threads mitigate the issue
// We must receive one message, that proves the slot processing is done
while
((
res
=
tryPullTpool
(
&
nf
,
Tpool
))
==
NULL
)
usleep
(
200
);
nbSlotProcessing
--
;
processingData_t
*
tmp
=
(
processingData_t
*
)
res
->
msgData
;
if
(
tmp
->
proc
.
decoded_frame_rx
!=
-
1
)
decoded_frame_rx
=
tmp
->
proc
.
decoded_frame_rx
;
}
while
(
nbSlotProcessing
>=
RX_NB_TH
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool
))
!=
NULL
)
{
nbSlotProcessing
--
;
...
...
@@ -705,6 +696,7 @@ void *UE_thread(void *arg) {
if
(
tmp
->
proc
.
decoded_frame_rx
!=
-
1
)
decoded_frame_rx
=
tmp
->
proc
.
decoded_frame_rx
;
}
usleep
(
200
);
}
...
...
@@ -712,8 +704,21 @@ void *UE_thread(void *arg) {
((
decoded_frame_rx
+
1
)
%
MAX_FRAME_NUMBER
)
!=
proc
->
frame_rx
)
LOG_D
(
PHY
,
"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode
\n
"
,
decoded_frame_rx
,
proc
->
frame_rx
);
nbSlotProcessing
++
;
processingMsg
[
thread_idx
]
->
key
=
slot_nr
;
pushTpool
(
Tpool
,
processingMsg
[
thread_idx
]);
if
(
getenv
(
"RFSIMULATOR"
))
{
// FixMe: Wait previous thread is done, because race conditions seems too bad
// in case of actual RF board, the overlap between threads mitigate the issue
// We must receive one message, that proves the slot processing is done
res
=
pullTpool
(
&
nf
,
Tpool
);
nbSlotProcessing
--
;
processingData_t
*
tmp
=
(
processingData_t
*
)
res
->
msgData
;
if
(
tmp
->
proc
.
decoded_frame_rx
!=
-
1
)
decoded_frame_rx
=
tmp
->
proc
.
decoded_frame_rx
;
}
}
// while !oai_exit
return
NULL
;
...
...
@@ -739,20 +744,17 @@ void init_UE(int nb_inst) {
nr_l2_init_ue
();
mac_inst
=
get_mac_inst
(
inst
);
mac_inst
->
if_module
=
UE
->
if_inst
;
// Initial bandwidth part configuration -- full carrier bandwidth
mac_inst
->
initial_bwp_dl
.
bwp_id
=
0
;
mac_inst
->
initial_bwp_dl
.
location
=
0
;
mac_inst
->
initial_bwp_dl
.
scs
=
UE
->
frame_parms
.
subcarrier_spacing
;
mac_inst
->
initial_bwp_dl
.
N_RB
=
UE
->
frame_parms
.
N_RB_DL
;
mac_inst
->
initial_bwp_dl
.
cyclic_prefix
=
UE
->
frame_parms
.
Ncp
;
mac_inst
->
initial_bwp_ul
.
bwp_id
=
0
;
mac_inst
->
initial_bwp_ul
.
location
=
0
;
mac_inst
->
initial_bwp_ul
.
scs
=
UE
->
frame_parms
.
subcarrier_spacing
;
mac_inst
->
initial_bwp_ul
.
N_RB
=
UE
->
frame_parms
.
N_RB_UL
;
mac_inst
->
initial_bwp_ul
.
cyclic_prefix
=
UE
->
frame_parms
.
Ncp
;
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
AssertFatal
(
0
==
pthread_create
(
&
threads
[
inst
],
&
attr
,
...
...
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