freebsd-ports/java/jdk13/files/patch-monitor_md.c
Greg Lewis 3ea68048cd . Make sure that all calls to pthread_mutex_trylock handle EDEADLK as well
as EBUSY.

  These are taken from equivalent patches to jdk14 by green and myself.
2004-11-28 05:29:25 +00:00

14 lines
490 B
C

$FreeBSD$
--- ../src/solaris/hpi/native_threads/src/monitor_md.c 11 Jul 2001 21:42:33 -0000 1.1.1.1
+++ ../src/solaris/hpi/native_threads/src/monitor_md.c 22 Nov 2004 17:19:50 -0000
@@ -132,7 +132,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;