diff options
Diffstat (limited to 'libjava/include/win32-threads.h')
-rw-r--r-- | libjava/include/win32-threads.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libjava/include/win32-threads.h b/libjava/include/win32-threads.h index ed5eb00..fdd21c5 100644 --- a/libjava/include/win32-threads.h +++ b/libjava/include/win32-threads.h @@ -86,6 +86,12 @@ int _Jv_CondNotifyAll (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *); // We use CRITICAL_SECTIONs instead of CreateMutex() for better performance // +// Returns 0 if the mutex lock is held by the current thread, and 1 otherwise. +inline int _Jv_MutexCheckMonitor (_Jv_Mutex_t *mu) +{ + return (mu->owner != GetCurrentThreadId ( )); +} + inline void _Jv_MutexInit (_Jv_Mutex_t *mu) { mu->owner = 0UL; |