diff options
author | glewis <glewis@FreeBSD.org> | 2004-11-02 13:24:05 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2004-11-02 13:24:05 +0800 |
commit | 7991e9df308b941d3c1e282d767d746ef631e27d (patch) | |
tree | 1601d7fc0e161f19004e7e69f38e4dbbf8b7aa83 /java | |
parent | 948050f5ca0d4a2b3438cb2a9cc6a5c98674f52d (diff) | |
download | freebsd-ports-gnome-7991e9df308b941d3c1e282d767d746ef631e27d.tar.gz freebsd-ports-gnome-7991e9df308b941d3c1e282d767d746ef631e27d.tar.zst freebsd-ports-gnome-7991e9df308b941d3c1e282d767d746ef631e27d.zip |
. Take into account that pthread_mutex_trylock() can return EDEADLK as
well as EBUSY with libkse on FreeBSD 5.x.
Inspired by: green
Diffstat (limited to 'java')
-rw-r--r-- | java/jdk14/files/patch-hpi_monitor_md.c | 11 | ||||
-rw-r--r-- | java/jdk14/files/patch-nspr_pth.h | 11 | ||||
-rw-r--r-- | java/jdk15/files/patch-hpi_monitor_md.c | 11 | ||||
-rw-r--r-- | java/jdk15/files/patch-nspr_pth.h | 11 | ||||
-rw-r--r-- | java/jdk16/files/patch-hpi_monitor_md.c | 11 | ||||
-rw-r--r-- | java/jdk16/files/patch-nspr_pth.h | 11 |
6 files changed, 66 insertions, 0 deletions
diff --git a/java/jdk14/files/patch-hpi_monitor_md.c b/java/jdk14/files/patch-hpi_monitor_md.c new file mode 100644 index 000000000000..ca874dd9cd35 --- /dev/null +++ b/java/jdk14/files/patch-hpi_monitor_md.c @@ -0,0 +1,11 @@ +--- ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 22 Oct 2003 23:03:43 -0000 1.1.1.2 ++++ ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 21 Oct 2004 05:42:52 -0000 +@@ -129,7 +129,7 @@ + mid->monitor_owner = self; + mid->entry_count = 1; + return SYS_OK; +- } else if (err == EBUSY) { /* it's already locked */ ++ } else if (err == EBUSY || err == EDEADLK) { /* it's already locked */ + if (mid->monitor_owner == self) { + mid->entry_count++; + return SYS_OK; diff --git a/java/jdk14/files/patch-nspr_pth.h b/java/jdk14/files/patch-nspr_pth.h new file mode 100644 index 000000000000..c2a1cb5d5ed1 --- /dev/null +++ b/java/jdk14/files/patch-nspr_pth.h @@ -0,0 +1,11 @@ +--- ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 22 Oct 2003 23:04:19 -0000 1.1.1.1 ++++ ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 21 Oct 2004 05:47:13 -0000 +@@ -52,7 +52,7 @@ + #define PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init + #define PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy + #define PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a)) +-#define PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) ++#define PTHREAD_MUTEX_IS_LOCKED(m) (0 != pthread_mutex_trylock(&(m))) + #define PTHREAD_CONDATTR_INIT pthread_condattr_init + #define PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy + #define PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) diff --git a/java/jdk15/files/patch-hpi_monitor_md.c b/java/jdk15/files/patch-hpi_monitor_md.c new file mode 100644 index 000000000000..ca874dd9cd35 --- /dev/null +++ b/java/jdk15/files/patch-hpi_monitor_md.c @@ -0,0 +1,11 @@ +--- ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 22 Oct 2003 23:03:43 -0000 1.1.1.2 ++++ ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 21 Oct 2004 05:42:52 -0000 +@@ -129,7 +129,7 @@ + mid->monitor_owner = self; + mid->entry_count = 1; + return SYS_OK; +- } else if (err == EBUSY) { /* it's already locked */ ++ } else if (err == EBUSY || err == EDEADLK) { /* it's already locked */ + if (mid->monitor_owner == self) { + mid->entry_count++; + return SYS_OK; diff --git a/java/jdk15/files/patch-nspr_pth.h b/java/jdk15/files/patch-nspr_pth.h new file mode 100644 index 000000000000..c2a1cb5d5ed1 --- /dev/null +++ b/java/jdk15/files/patch-nspr_pth.h @@ -0,0 +1,11 @@ +--- ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 22 Oct 2003 23:04:19 -0000 1.1.1.1 ++++ ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 21 Oct 2004 05:47:13 -0000 +@@ -52,7 +52,7 @@ + #define PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init + #define PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy + #define PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a)) +-#define PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) ++#define PTHREAD_MUTEX_IS_LOCKED(m) (0 != pthread_mutex_trylock(&(m))) + #define PTHREAD_CONDATTR_INIT pthread_condattr_init + #define PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy + #define PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) diff --git a/java/jdk16/files/patch-hpi_monitor_md.c b/java/jdk16/files/patch-hpi_monitor_md.c new file mode 100644 index 000000000000..ca874dd9cd35 --- /dev/null +++ b/java/jdk16/files/patch-hpi_monitor_md.c @@ -0,0 +1,11 @@ +--- ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 22 Oct 2003 23:03:43 -0000 1.1.1.2 ++++ ../../j2se/src/solaris/hpi/native_threads/src/monitor_md.c 21 Oct 2004 05:42:52 -0000 +@@ -129,7 +129,7 @@ + mid->monitor_owner = self; + mid->entry_count = 1; + return SYS_OK; +- } else if (err == EBUSY) { /* it's already locked */ ++ } else if (err == EBUSY || err == EDEADLK) { /* it's already locked */ + if (mid->monitor_owner == self) { + mid->entry_count++; + return SYS_OK; diff --git a/java/jdk16/files/patch-nspr_pth.h b/java/jdk16/files/patch-nspr_pth.h new file mode 100644 index 000000000000..c2a1cb5d5ed1 --- /dev/null +++ b/java/jdk16/files/patch-nspr_pth.h @@ -0,0 +1,11 @@ +--- ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 22 Oct 2003 23:04:19 -0000 1.1.1.1 ++++ ../../deploy/src/plugin/oji-plugin/include/solaris/navig4/nspr/md/_pth.h 21 Oct 2004 05:47:13 -0000 +@@ -52,7 +52,7 @@ + #define PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init + #define PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy + #define PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a)) +-#define PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) ++#define PTHREAD_MUTEX_IS_LOCKED(m) (0 != pthread_mutex_trylock(&(m))) + #define PTHREAD_CONDATTR_INIT pthread_condattr_init + #define PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy + #define PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) |