aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/jdk15/Makefile2
-rw-r--r--java/jdk15/files/patch-vm::os_bsd.cpp32
-rw-r--r--java/jdk16/Makefile2
-rw-r--r--java/jdk16/files/patch-vm::os_bsd.cpp32
4 files changed, 66 insertions, 2 deletions
diff --git a/java/jdk15/Makefile b/java/jdk15/Makefile
index 948ad8bf8a3d..680b1f6df1f2 100644
--- a/java/jdk15/Makefile
+++ b/java/jdk15/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk15.html
diff --git a/java/jdk15/files/patch-vm::os_bsd.cpp b/java/jdk15/files/patch-vm::os_bsd.cpp
index 25bd71db866c..f9d9f795f508 100644
--- a/java/jdk15/files/patch-vm::os_bsd.cpp
+++ b/java/jdk15/files/patch-vm::os_bsd.cpp
@@ -11,3 +11,35 @@ $FreeBSD$
#define EXTENSIONS_DIR "/lib/ext"
#define ENDORSED_DIR "/lib/endorsed"
+@@ -1968,16 +1968,23 @@
+
+ static int os_sleep(jlong millis, bool interruptible) {
+ int res;
+- if (!interruptible) {
+- do {
+- res = os_nanosleep(&millis);
+- } while ((res == OS_ERR) && (errno == EINTR) && (millis > 0));
+- } else {
+- INTERRUPTIBLE_NORESTART_VM(os_nanosleep(&millis), res, os::Bsd::clear_interrupted);
++
++ while (millis > 0) {
++ if (!interruptible) {
++ res = os_nanosleep(&millis);
++ } else {
++ INTERRUPTIBLE_NORESTART_VM(os_nanosleep(&millis), res, os::Bsd::clear_interrupted);
++ }
++ // INTERRUPTIBLE_NORESTART_VM returns res == OS_INTRPT for thread.Interrupt
++
++ if((res == OS_ERR) && (errno == EINTR)) {
++ if(millis <= 0)
++ return OS_OK;
++ } else
++ return res;
+ }
+- // INTERRUPTIBLE_NORESTART_VM returns res == OS_INTRPT for thread.Interrupt
+
+- return res;
++ return OS_OK;
+ }
+
+ int os::Bsd::naked_sleep() {
diff --git a/java/jdk16/Makefile b/java/jdk16/Makefile
index 948ad8bf8a3d..680b1f6df1f2 100644
--- a/java/jdk16/Makefile
+++ b/java/jdk16/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk15.html
diff --git a/java/jdk16/files/patch-vm::os_bsd.cpp b/java/jdk16/files/patch-vm::os_bsd.cpp
index 25bd71db866c..f9d9f795f508 100644
--- a/java/jdk16/files/patch-vm::os_bsd.cpp
+++ b/java/jdk16/files/patch-vm::os_bsd.cpp
@@ -11,3 +11,35 @@ $FreeBSD$
#define EXTENSIONS_DIR "/lib/ext"
#define ENDORSED_DIR "/lib/endorsed"
+@@ -1968,16 +1968,23 @@
+
+ static int os_sleep(jlong millis, bool interruptible) {
+ int res;
+- if (!interruptible) {
+- do {
+- res = os_nanosleep(&millis);
+- } while ((res == OS_ERR) && (errno == EINTR) && (millis > 0));
+- } else {
+- INTERRUPTIBLE_NORESTART_VM(os_nanosleep(&millis), res, os::Bsd::clear_interrupted);
++
++ while (millis > 0) {
++ if (!interruptible) {
++ res = os_nanosleep(&millis);
++ } else {
++ INTERRUPTIBLE_NORESTART_VM(os_nanosleep(&millis), res, os::Bsd::clear_interrupted);
++ }
++ // INTERRUPTIBLE_NORESTART_VM returns res == OS_INTRPT for thread.Interrupt
++
++ if((res == OS_ERR) && (errno == EINTR)) {
++ if(millis <= 0)
++ return OS_OK;
++ } else
++ return res;
+ }
+- // INTERRUPTIBLE_NORESTART_VM returns res == OS_INTRPT for thread.Interrupt
+
+- return res;
++ return OS_OK;
+ }
+
+ int os::Bsd::naked_sleep() {