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
alex037yang
OpenXG-RAN
Commits
38ad43b6
Commit
38ad43b6
authored
7 years ago
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync variables to one when killing threads
parent
102e4f16
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+3
-3
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+9
-9
No files found.
targets/RT/USER/lte-enb.c
View file @
38ad43b6
...
@@ -1042,12 +1042,12 @@ void kill_eNB_proc(int inst) {
...
@@ -1042,12 +1042,12 @@ void kill_eNB_proc(int inst) {
LOG_I
(
PHY
,
"Killing TX CC_id %d inst %d
\n
"
,
CC_id
,
inst
);
LOG_I
(
PHY
,
"Killing TX CC_id %d inst %d
\n
"
,
CC_id
,
inst
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
pthread_mutex_lock
(
&
proc_rxtx
[
i
].
mutex_rxtx
);
pthread_mutex_lock
(
&
proc_rxtx
[
i
].
mutex_rxtx
);
proc_rxtx
[
i
].
instance_cnt_rxtx
=
0
;
proc_rxtx
[
i
].
instance_cnt_rxtx
=
1
;
proc_rxtx
[
i
].
pipe_ready
=
0
;
proc_rxtx
[
i
].
pipe_ready
=
0
;
pthread_cond_signal
(
&
proc_rxtx
[
i
].
cond_rxtx
);
pthread_cond_signal
(
&
proc_rxtx
[
i
].
cond_rxtx
);
pthread_mutex_unlock
(
&
proc_rxtx
[
i
].
mutex_rxtx
);
pthread_mutex_unlock
(
&
proc_rxtx
[
i
].
mutex_rxtx
);
}
}
proc
->
instance_cnt_prach
=
0
;
proc
->
instance_cnt_prach
=
1
;
pthread_cond_signal
(
&
proc
->
cond_prach
);
pthread_cond_signal
(
&
proc
->
cond_prach
);
pthread_cond_signal
(
&
proc
->
cond_asynch_rxtx
);
pthread_cond_signal
(
&
proc
->
cond_asynch_rxtx
);
...
@@ -1060,7 +1060,7 @@ void kill_eNB_proc(int inst) {
...
@@ -1060,7 +1060,7 @@ void kill_eNB_proc(int inst) {
pthread_mutex_destroy
(
&
proc
->
mutex_prach
);
pthread_mutex_destroy
(
&
proc
->
mutex_prach
);
pthread_cond_destroy
(
&
proc
->
cond_prach
);
pthread_cond_destroy
(
&
proc
->
cond_prach
);
#ifdef Rel14
#ifdef Rel14
proc
->
instance_cnt_prach_br
=
0
;
proc
->
instance_cnt_prach_br
=
1
;
pthread_cond_signal
(
&
proc
->
cond_prach_br
);
pthread_cond_signal
(
&
proc
->
cond_prach_br
);
pthread_join
(
proc
->
pthread_prach_br
,
(
void
**
)
&
status
);
pthread_join
(
proc
->
pthread_prach_br
,
(
void
**
)
&
status
);
pthread_mutex_destroy
(
&
proc
->
mutex_prach_br
);
pthread_mutex_destroy
(
&
proc
->
mutex_prach_br
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ru.c
View file @
38ad43b6
...
@@ -1902,42 +1902,42 @@ void kill_RU_proc(int inst)
...
@@ -1902,42 +1902,42 @@ void kill_RU_proc(int inst)
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
pthread_mutex_lock
(
&
proc
->
mutex_FH
);
pthread_mutex_lock
(
&
proc
->
mutex_FH
);
proc
->
instance_cnt_FH
=
0
;
proc
->
instance_cnt_FH
=
1
;
pthread_cond_signal
(
&
proc
->
cond_FH
);
pthread_cond_signal
(
&
proc
->
cond_FH
);
pthread_mutex_unlock
(
&
proc
->
mutex_FH
);
pthread_mutex_unlock
(
&
proc
->
mutex_FH
);
LOG_D
(
PHY
,
"Joining pthread_FH
\n
"
);
LOG_D
(
PHY
,
"Joining pthread_FH
\n
"
);
pthread_join
(
proc
->
pthread_FH
,
NULL
);
pthread_join
(
proc
->
pthread_FH
,
NULL
);
pthread_mutex_lock
(
&
proc
->
mutex_FH1
);
pthread_mutex_lock
(
&
proc
->
mutex_FH1
);
proc
->
instance_cnt_FH1
=
0
;
proc
->
instance_cnt_FH1
=
1
;
pthread_cond_signal
(
&
proc
->
cond_FH1
);
pthread_cond_signal
(
&
proc
->
cond_FH1
);
pthread_mutex_unlock
(
&
proc
->
mutex_FH1
);
pthread_mutex_unlock
(
&
proc
->
mutex_FH1
);
pthread_mutex_lock
(
&
proc
->
mutex_prach
);
pthread_mutex_lock
(
&
proc
->
mutex_prach
);
proc
->
instance_cnt_prach
=
0
;
proc
->
instance_cnt_prach
=
1
;
pthread_cond_signal
(
&
proc
->
cond_prach
);
pthread_cond_signal
(
&
proc
->
cond_prach
);
pthread_mutex_unlock
(
&
proc
->
mutex_prach
);
pthread_mutex_unlock
(
&
proc
->
mutex_prach
);
#ifdef Rel14
#ifdef Rel14
pthread_mutex_lock
(
&
proc
->
mutex_prach_br
);
pthread_mutex_lock
(
&
proc
->
mutex_prach_br
);
proc
->
instance_cnt_prach_br
=
0
;
proc
->
instance_cnt_prach_br
=
1
;
pthread_cond_signal
(
&
proc
->
cond_prach_br
);
pthread_cond_signal
(
&
proc
->
cond_prach_br
);
pthread_mutex_unlock
(
&
proc
->
mutex_prach_br
);
pthread_mutex_unlock
(
&
proc
->
mutex_prach_br
);
#endif
#endif
pthread_mutex_lock
(
&
proc
->
mutex_synch
);
pthread_mutex_lock
(
&
proc
->
mutex_synch
);
proc
->
instance_cnt_synch
=
0
;
proc
->
instance_cnt_synch
=
1
;
pthread_cond_signal
(
&
proc
->
cond_synch
);
pthread_cond_signal
(
&
proc
->
cond_synch
);
pthread_mutex_unlock
(
&
proc
->
mutex_synch
);
pthread_mutex_unlock
(
&
proc
->
mutex_synch
);
pthread_mutex_lock
(
&
proc
->
mutex_eNBs
);
pthread_mutex_lock
(
&
proc
->
mutex_eNBs
);
proc
->
ru_tx_ready
=
0
;
proc
->
ru_tx_ready
=
0
;
proc
->
instance_cnt_eNBs
=
0
;
proc
->
instance_cnt_eNBs
=
1
;
pthread_cond_signal
(
&
proc
->
cond_eNBs
);
pthread_cond_signal
(
&
proc
->
cond_eNBs
);
pthread_mutex_unlock
(
&
proc
->
mutex_eNBs
);
pthread_mutex_unlock
(
&
proc
->
mutex_eNBs
);
pthread_mutex_lock
(
&
proc
->
mutex_asynch_rxtx
);
pthread_mutex_lock
(
&
proc
->
mutex_asynch_rxtx
);
proc
->
instance_cnt_asynch_rxtx
=
0
;
proc
->
instance_cnt_asynch_rxtx
=
1
;
pthread_cond_signal
(
&
proc
->
cond_asynch_rxtx
);
pthread_cond_signal
(
&
proc
->
cond_asynch_rxtx
);
pthread_mutex_unlock
(
&
proc
->
mutex_asynch_rxtx
);
pthread_mutex_unlock
(
&
proc
->
mutex_asynch_rxtx
);
...
@@ -1971,7 +1971,7 @@ void kill_RU_proc(int inst)
...
@@ -1971,7 +1971,7 @@ void kill_RU_proc(int inst)
if
(
get_nprocs
()
>
2
&&
fepw
)
{
if
(
get_nprocs
()
>
2
&&
fepw
)
{
if
(
ru
->
feprx
)
{
if
(
ru
->
feprx
)
{
pthread_mutex_lock
(
&
proc
->
mutex_fep
);
pthread_mutex_lock
(
&
proc
->
mutex_fep
);
proc
->
instance_cnt_fep
=
0
;
proc
->
instance_cnt_fep
=
1
;
pthread_mutex_unlock
(
&
proc
->
mutex_fep
);
pthread_mutex_unlock
(
&
proc
->
mutex_fep
);
pthread_cond_signal
(
&
proc
->
cond_fep
);
pthread_cond_signal
(
&
proc
->
cond_fep
);
LOG_D
(
PHY
,
"Joining pthread_fep
\n
"
);
LOG_D
(
PHY
,
"Joining pthread_fep
\n
"
);
...
@@ -1981,7 +1981,7 @@ void kill_RU_proc(int inst)
...
@@ -1981,7 +1981,7 @@ void kill_RU_proc(int inst)
}
}
if
(
ru
->
feptx_ofdm
)
{
if
(
ru
->
feptx_ofdm
)
{
pthread_mutex_lock
(
&
proc
->
mutex_feptx
);
pthread_mutex_lock
(
&
proc
->
mutex_feptx
);
proc
->
instance_cnt_feptx
=
0
;
proc
->
instance_cnt_feptx
=
1
;
pthread_mutex_unlock
(
&
proc
->
mutex_feptx
);
pthread_mutex_unlock
(
&
proc
->
mutex_feptx
);
pthread_cond_signal
(
&
proc
->
cond_feptx
);
pthread_cond_signal
(
&
proc
->
cond_feptx
);
LOG_D
(
PHY
,
"Joining pthread_feptx
\n
"
);
LOG_D
(
PHY
,
"Joining pthread_feptx
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
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