Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
604d52a4
Commit
604d52a4
authored
2 years ago
by
Luis Pereira
Committed by
Robert Schmidt
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replace sleep by mutex in itti_wait_tasks_end()
parent
c4a657cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1667
integration_2022_wk33
,
!1562
Correctly handle SIGINT/stop signal in nr-softmodem
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/utils/ocp_itti/intertask_interface.cpp
+9
-8
9 additions, 8 deletions
common/utils/ocp_itti/intertask_interface.cpp
with
9 additions
and
8 deletions
common/utils/ocp_itti/intertask_interface.cpp
+
9
−
8
View file @
604d52a4
...
...
@@ -438,23 +438,24 @@ extern "C" {
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
const
char
msg
[]
=
"
\n
** Caught SIGTERM, shutting down
\n
"
;
__attribute__
((
unused
))
int
unused
=
write
(
STDOUT_FILENO
,
msg
,
sizeof
(
msg
)
-
1
);
shutting_down
=
true
;
pthread_mutex_unlock
(
&
signal_mutex
)
;
}
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(SIGINT, catch_sigterm);
while
(
!
shutting_down
)
{
sleep
(
24
*
3600
);
}
signal
(
SIGINT
,
catch_sigterm
);
pthread_mutex_lock
(
&
signal_mutex
);
}
void
itti_update_lte_time
(
uint32_t
frame
,
uint8_t
slot
)
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment