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
littleBu
OpenXG-RAN
Commits
31dcdf21
Commit
31dcdf21
authored
2 years ago
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement abortNotifiedFIFO() to unlock FIFO waits
parent
dfd9a91b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+18
-0
executables/nr-gnb.c
executables/nr-gnb.c
+5
-0
No files found.
common/utils/threadPool/thread-pool.h
View file @
31dcdf21
...
...
@@ -222,6 +222,24 @@ static inline int abortNotifiedFIFOJob(notifiedFIFO_t *nf, uint64_t key) {
return
nbDeleted
;
}
// This functions aborts all messages in the queue, and marks the queue as
// "aborted", such that every call to it will return NULL
static
inline
void
abortNotifiedFIFO
(
notifiedFIFO_t
*
nf
)
{
mutexlock
(
nf
->
lockF
);
nf
->
abortFIFO
=
true
;
notifiedFIFO_elt_t
**
elt
=
&
nf
->
outF
;
while
(
*
elt
!=
NULL
)
{
notifiedFIFO_elt_t
*
p
=
*
elt
;
*
elt
=
(
*
elt
)
->
next
;
delNotifiedFIFO_elt
(
p
);
}
if
(
nf
->
outF
==
NULL
)
nf
->
inF
=
NULL
;
mutexunlock
(
nf
->
lockF
);
condsignal
(
nf
->
notifF
);
}
struct
one_thread
{
pthread_t
threadID
;
int
id
;
...
...
This diff is collapsed.
Click to expand it.
executables/nr-gnb.c
View file @
31dcdf21
...
...
@@ -477,6 +477,11 @@ void init_gNB_Tpool(int inst) {
void
term_gNB_Tpool
(
int
inst
)
{
PHY_VARS_gNB
*
gNB
=
RC
.
gNB
[
inst
];
abortTpool
(
&
gNB
->
threadPool
);
abortNotifiedFIFO
(
&
gNB
->
respDecode
);
abortNotifiedFIFO
(
&
gNB
->
resp_L1
);
abortNotifiedFIFO
(
&
gNB
->
L1_tx_free
);
abortNotifiedFIFO
(
&
gNB
->
L1_tx_filled
);
abortNotifiedFIFO
(
&
gNB
->
L1_tx_out
);
}
/*!
...
...
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