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
wangjie
OpenXG-RAN
Commits
c15f67c7
Commit
c15f67c7
authored
Jan 22, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mutex unlock after cond_signal
parent
ed10f077
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+9
-12
No files found.
targets/RT/USER/lte-enb.c
View file @
c15f67c7
...
...
@@ -363,12 +363,10 @@ static void *L1_thread_tx(void *param) {
LOG_D
(
PHY
,
"L1 TX signaling done for %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
// the thread can now be woken up
LOG_D
(
PHY
,
"L1_thread_tx: signaling completion in %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
AssertFatal
((
ret
=
pthread_cond_signal
(
&
proc
->
cond
))
==
0
,
"ERROR pthread_cond_signal for eNB TXnp4 thread ret %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
proc
->
mutex
))
==
0
,
"error unlocking L1_proc_tx mutex, return %d
\n
"
,
ret
);
if
(
pthread_cond_signal
(
&
proc
->
cond
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
}
wakeup_txfh
(
eNB
,
proc
,
frame_tx
,
subframe_tx
,
timestamp_tx
);
}
...
...
@@ -532,10 +530,11 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
ru_proc
->
tti_tx
=
subframe_tx
;
ru_proc
->
frame_tx
=
frame_tx
;
LOG_D
(
PHY
,
"L1 TX Waking up TX FH (2) %d.%d
\n
"
,
frame_tx
,
subframe_tx
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru_proc
->
mutex_eNBs
))
==
0
,
"mutex_unlock returned %d
\n
"
,
ret
);
// the thread can now be woken up
AssertFatal
(
pthread_cond_signal
(
&
ru_proc
->
cond_eNBs
)
==
0
,
"[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread
\n
"
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru_proc
->
mutex_eNBs
))
==
0
,
"mutex_unlock returned %d
\n
"
,
ret
);
}
return
(
0
);
...
...
@@ -568,9 +567,10 @@ int wakeup_tx(PHY_VARS_eNB *eNB,
L1_proc_tx
->
timestamp_tx
=
timestamp_tx
;
// the thread can now be woken up
LOG_D
(
PHY
,
"L1 RX Waking up L1 TX %d.%d
\n
"
,
frame_tx
,
subframe_tx
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc_tx
->
mutex
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
AssertFatal
(
pthread_cond_signal
(
&
L1_proc_tx
->
cond
)
==
0
,
"ERROR pthread_cond_signal for eNB L1 thread tx
\n
"
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc_tx
->
mutex
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
return
(
0
);
}
...
...
@@ -613,14 +613,11 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU
+
ru
->
idx
,
L1_proc
->
frame_tx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_TX_RU
+
ru
->
idx
,
L1_proc
->
subframe_tx
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"mutex_unlock return %d
\n
"
,
ret
);
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
L1_proc
->
cond
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB RXn-TXnp4 thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
AssertFatal
((
ret
=
pthread_cond_signal
(
&
L1_proc
->
cond
))
==
0
,
"ERROR pthread_cond_signal for eNB RXn-TXnp4 thread, ret %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"mutex_unlock return %d
\n
"
,
ret
);
return
(
0
);
}
...
...
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