diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-09 05:41:56 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-09 05:41:56 +0000 |
commit | 25882d984559dcf6fe7381fa7e05a41b3e39e2c3 (patch) | |
tree | d99505540e265a3314a56696be14cfaa4bedd148 /libjava/posix-threads.cc | |
parent | 4996a955146ff81b8e0c812e60065fac7e3e06e6 (diff) | |
download | gcc-25882d984559dcf6fe7381fa7e05a41b3e39e2c3.tar.gz |
2000-04-08 Anthony Green <green@cygnus.com>
* posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
(_Jv_MutexUnlock): Ditto.
* include/posix-threads.h (_Jv_MutexLock): From posix-threads.cc.
(_Jv_MutexUnlock): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33037 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r-- | libjava/posix-threads.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index a664ee37060..e6b4b256720 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -402,39 +402,6 @@ _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data, } } -int -_Jv_MutexLock (_Jv_Mutex_t *mu) -{ - pthread_t self = pthread_self (); - if (mu->owner == self) - { - mu->count++; - } - else - { - pthread_mutex_lock (&mu->mutex); - mu->count = 1; - mu->owner = self; - } - return 0; -} - -int -_Jv_MutexUnlock (_Jv_Mutex_t *mu) -{ - if (_Jv_PthreadCheckMonitor (mu)) - return _JV_NOT_OWNER; - - mu->count--; - - if (mu->count == 0) - { - mu->owner = 0; - pthread_mutex_unlock (&mu->mutex); - } - return 0; -} - void _Jv_ThreadWait (void) { |