Skip to content

Commit

Permalink
Merge pull request eclipse-omr#7161 from jjohnst-us/ztpfSigShutdownMo…
Browse files Browse the repository at this point in the history
…nitor

Add check for ztpfSigShutdownMonitor before attempting to shut it down
  • Loading branch information
babsingh authored Oct 30, 2023
2 parents 94e4438 + a57a61a commit 80c9b37
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions port/ztpf/omrsignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,12 +1321,15 @@ sig_full_shutdown(struct OMRPortLibrary *portLibrary)
}
omrthread_monitor_exit(asyncReporterShutdownMonitor);
#endif /* defined(OMR_PORT_ASYNC_HANDLER) */
omrthread_monitor_enter(ztpfSigShutdownMonitor);
shutdown_ztpf_sigpush = 1;
while (shutdown_ztpf_sigpush) {
omrthread_monitor_wait(ztpfSigShutdownMonitor);
/* Assume if zTPF signal monitor is gone no need to shut it down. */
if (NULL != ztpfSigShutdownMonitor) {
omrthread_monitor_enter(ztpfSigShutdownMonitor);
shutdown_ztpf_sigpush = 1;
while (0 != shutdown_ztpf_sigpush) {
omrthread_monitor_wait(ztpfSigShutdownMonitor);
}
omrthread_monitor_exit(ztpfSigShutdownMonitor);
}
omrthread_monitor_exit(ztpfSigShutdownMonitor);
/* destroy all of the remaining monitors */
destroySignalTools(portLibrary);
}
Expand Down

0 comments on commit 80c9b37

Please sign in to comment.