diff options
author | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-21 04:46:19 +0000 |
---|---|---|
committer | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-21 04:46:19 +0000 |
commit | 7c2ddf15e59cec9fe51ad7eeac50ecb31762bc4c (patch) | |
tree | b5325b3608586fc1cc0a4882b22a1fee0f1262bb /libjava/java/lang/Thread.java | |
parent | d80ce0591091c7dc6de461afc7beeb435f718018 (diff) | |
download | ppe42-gcc-7c2ddf15e59cec9fe51ad7eeac50ecb31762bc4c.tar.gz ppe42-gcc-7c2ddf15e59cec9fe51ad7eeac50ecb31762bc4c.zip |
2003-10-21 Jerry Quinn <jlquinn@optonline.net>
* posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename
_Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor.
* include/no-threads.h (_Jv_MutexCheckMonitor): New.
* include/posix-threads.h (_Jv_MutexCheckMonitor): Rename from
_Jv_PthreadCheckMonitor. Simplify code.
(_Jv_MutexUnlock): Use _Jv_MutexCheckMonitor.
* include/win32-threads.h (_Jv_MutexCheckMonitor): New.
* java/lang/Object.h (_Jv_ObjectCheckMonitor): Declare.
* java/lang/Thread.java (holdsLock): New.
* java/lang/natObject.cc (_Jv_ObjectCheckMonitor): New, with and
without JV_HASH_SYNCHRONIZATION.
* java/lang/natThread.cc (java::lang::Thread::holdsLock): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72741 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Thread.java')
-rw-r--r-- | libjava/java/lang/Thread.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libjava/java/lang/Thread.java b/libjava/java/lang/Thread.java index 64498b23ba4..d537220ab02 100644 --- a/libjava/java/lang/Thread.java +++ b/libjava/java/lang/Thread.java @@ -182,6 +182,15 @@ public class Thread implements Runnable } /** + * Return true if this Thread holds the object's lock, false otherwise. + * + * @param obj the object to test lock ownership on. + * @throws NullPointerException if obj is null. + * @since 1.4 + */ + public static native boolean holdsLock (Object obj); + + /** * Interrupt this Thread. First, there is a security check, * <code>checkAccess</code>. Then, depending on the current state of the * thread, various actions take place: |