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
604d52a4
Commit
604d52a4
authored
May 16, 2022
by
luis_pereira87
Committed by
Robert Schmidt
Aug 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace sleep by mutex in itti_wait_tasks_end()
parent
c4a657cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+9
-8
No files found.
common/utils/ocp_itti/intertask_interface.cpp
View file @
604d52a4
...
@@ -438,23 +438,24 @@ extern "C" {
...
@@ -438,23 +438,24 @@ extern "C" {
void
itti_send_terminate_message
(
task_id_t
task_id
)
{
void
itti_send_terminate_message
(
task_id_t
task_id
)
{
}
}
static
volatile
bool
shutting_down
;
pthread_mutex_t
signal_mutex
;
static
void
catch_sigterm
(
int
)
{
static
void
catch_sigterm
(
int
)
{
static
const
char
msg
[]
=
"
\n
** Caught SIGTERM, shutting down
\n
"
;
static
const
char
msg
[]
=
"
\n
** Caught SIGTERM, shutting down
\n
"
;
__attribute__
((
unused
))
__attribute__
((
unused
))
int
unused
=
write
(
STDOUT_FILENO
,
msg
,
sizeof
(
msg
)
-
1
);
int
unused
=
write
(
STDOUT_FILENO
,
msg
,
sizeof
(
msg
)
-
1
);
shutting_down
=
true
;
pthread_mutex_unlock
(
&
signal_mutex
)
;
}
}
void
itti_wait_tasks_end
(
void
)
{
void
itti_wait_tasks_end
(
void
)
{
shutting_down
=
false
;
pthread_mutex_init
(
&
signal_mutex
,
NULL
);
pthread_mutex_lock
(
&
signal_mutex
);
signal
(
SIGTERM
,
catch_sigterm
);
signal
(
SIGTERM
,
catch_sigterm
);
//signal(SIGINT, catch_sigterm);
signal
(
SIGINT
,
catch_sigterm
);
while
(
!
shutting_down
)
{
pthread_mutex_lock
(
&
signal_mutex
);
sleep
(
24
*
3600
);
}
}
}
void
itti_update_lte_time
(
uint32_t
frame
,
uint8_t
slot
)
{}
void
itti_update_lte_time
(
uint32_t
frame
,
uint8_t
slot
)
{}
...
...
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