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
75cc625f
Commit
75cc625f
authored
1 year ago
by
Laurent THOMAS
Committed by
Robert Schmidt
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use recursive mutex in PDCP to prevent deadlocks
parent
1fb68160
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
+7
-1
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
View file @
75cc625f
...
...
@@ -45,7 +45,13 @@ nr_pdcp_ue_manager_t *new_nr_pdcp_ue_manager(int enb_flag)
exit
(
1
);
}
if
(
pthread_mutex_init
(
&
ret
->
lock
,
NULL
))
abort
();
pthread_mutexattr_t
Attr
;
pthread_mutexattr_init
(
&
Attr
);
// We need to be recursive because pdcp locks before forwarding, and calls in same thread,
// so, if same thread wants to send something back, and there is no itti intermediate thread, we deadlock on ourselves
pthread_mutexattr_settype
(
&
Attr
,
PTHREAD_MUTEX_RECURSIVE
);
if
(
pthread_mutex_init
(
&
ret
->
lock
,
&
Attr
))
abort
();
ret
->
enb_flag
=
enb_flag
;
return
ret
;
...
...
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