8227250: UserHandler contains ancient LinuxThreads code
authordholmes
Wed, 31 Jul 2019 00:02:01 -0400
changeset 57599 98dfaf0f9442
parent 57598 80ba2f1cdd4d
child 57600 3d44a84147cc
8227250: UserHandler contains ancient LinuxThreads code Reviewed-by: hseigel, dcubed
src/hotspot/os/aix/os_aix.cpp
src/hotspot/os/bsd/os_bsd.cpp
src/hotspot/os/linux/os_linux.cpp
--- a/src/hotspot/os/aix/os_aix.cpp	Tue Jul 30 17:31:29 2019 -0400
+++ b/src/hotspot/os/aix/os_aix.cpp	Wed Jul 31 00:02:01 2019 -0400
@@ -1661,16 +1661,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 // sun.misc.Signal support
 
-static volatile jint sigint_count = 0;
-
 static void
 UserHandler(int sig, void *siginfo, void *context) {
-  // 4511530 - sem_post is serialized and handled by the manager thread. When
-  // the program is interrupted by Ctrl-C, SIGINT is sent to every thread. We
-  // don't want to flood the manager thread with sem_post requests.
-  if (sig == SIGINT && Atomic::add(1, &sigint_count) > 1)
-    return;
-
   // Ctrl-C is pressed during error reporting, likely because the error
   // handler fails to abort. Let VM die immediately.
   if (sig == SIGINT && VMError::is_error_reported()) {
@@ -1810,7 +1802,6 @@
 }
 
 static int check_pending_signals() {
-  Atomic::store(0, &sigint_count);
   for (;;) {
     for (int i = 0; i < NSIG + 1; i++) {
       jint n = pending_signals[i];
--- a/src/hotspot/os/bsd/os_bsd.cpp	Tue Jul 30 17:31:29 2019 -0400
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Wed Jul 31 00:02:01 2019 -0400
@@ -1775,16 +1775,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 // sun.misc.Signal support
 
-static volatile jint sigint_count = 0;
-
 static void UserHandler(int sig, void *siginfo, void *context) {
-  // 4511530 - sem_post is serialized and handled by the manager thread. When
-  // the program is interrupted by Ctrl-C, SIGINT is sent to every thread. We
-  // don't want to flood the manager thread with sem_post requests.
-  if (sig == SIGINT && Atomic::add(1, &sigint_count) > 1) {
-    return;
-  }
-
   // Ctrl-C is pressed during error reporting, likely because the error
   // handler fails to abort. Let VM die immediately.
   if (sig == SIGINT && VMError::is_error_reported()) {
@@ -1854,7 +1845,6 @@
 }
 
 static int check_pending_signals() {
-  Atomic::store(0, &sigint_count);
   for (;;) {
     for (int i = 0; i < NSIG + 1; i++) {
       jint n = pending_signals[i];
--- a/src/hotspot/os/linux/os_linux.cpp	Tue Jul 30 17:31:29 2019 -0400
+++ b/src/hotspot/os/linux/os_linux.cpp	Wed Jul 31 00:02:01 2019 -0400
@@ -2676,16 +2676,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 // sun.misc.Signal support
 
-static volatile jint sigint_count = 0;
-
 static void UserHandler(int sig, void *siginfo, void *context) {
-  // 4511530 - sem_post is serialized and handled by the manager thread. When
-  // the program is interrupted by Ctrl-C, SIGINT is sent to every thread. We
-  // don't want to flood the manager thread with sem_post requests.
-  if (sig == SIGINT && Atomic::add(1, &sigint_count) > 1) {
-    return;
-  }
-
   // Ctrl-C is pressed during error reporting, likely because the error
   // handler fails to abort. Let VM die immediately.
   if (sig == SIGINT && VMError::is_error_reported()) {
@@ -2758,7 +2749,6 @@
 }
 
 static int check_pending_signals() {
-  Atomic::store(0, &sigint_count);
   for (;;) {
     for (int i = 0; i < NSIG + 1; i++) {
       jint n = pending_signals[i];