summaryrefslogtreecommitdiff
path: root/libjava/posix-threads.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 18:29:39 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 18:29:39 +0000
commit95d0972a456a74932b8b6d9903a9b6298135fa74 (patch)
tree6fb15ec8b692fb14a98a2eaba9879e17e7f496a6 /libjava/posix-threads.cc
parent48fed70da8535477f34246665e74452c895ffa51 (diff)
downloadgcc-95d0972a456a74932b8b6d9903a9b6298135fa74.tar.gz
* posix-threads.cc (_Jv_CondWait): Call _Jv_PthreadCheckMonitor.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): New function. (_Jv_CondNotify): Use it. (_Jv_CondNotifyAll): Likewise. * java/lang/Class.h (JV_STATE_NOTHING): Correct misspelling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r--libjava/posix-threads.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc
index 48f0a7f738f..413f7c3bfce 100644
--- a/libjava/posix-threads.cc
+++ b/libjava/posix-threads.cc
@@ -75,6 +75,9 @@ int
_Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
jlong millis, jint nanos)
{
+ if (_Jv_PthreadCheckMonitor (mu))
+ return 1;
+
int r;
pthread_mutex_t *pmu;
#ifdef HAVE_RECURSIVE_MUTEX
@@ -82,6 +85,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
#else
pmu = &mu->mutex2;
#endif
+
if (millis == 0 && nanos == 0)
r = pthread_cond_wait (cv, pmu);
else
@@ -96,6 +100,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
if (r && errno == ETIMEDOUT)
r = 0;
}
+
return r;
}