diff options
author | Andrew Haley <aph@redhat.com> | 2009-11-17 18:05:00 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2009-11-17 18:05:00 +0000 |
commit | 6bab0284947ba4c0e4028ea7703d90a8fba932b2 (patch) | |
tree | 20d1549cdc546ec2d35dc2b1c11cf122162ef5db /libjava/include/posix-threads.h | |
parent | 37740cd3af83c312403d90defa95b2832dbc582a (diff) | |
download | gcc-6bab0284947ba4c0e4028ea7703d90a8fba932b2.zip gcc-6bab0284947ba4c0e4028ea7703d90a8fba932b2.tar.gz gcc-6bab0284947ba4c0e4028ea7703d90a8fba932b2.tar.bz2 |
posix-threads.cc (park): Rewrite code to handle time.
2009-11-17 Andrew Haley <aph@redhat.com>
* posix-threads.cc (park): Rewrite code to handle time.
Move mutex lock before the call to compare_and_swap to avoid a
race condition.
Add some assertions.
(unpark): Add an assertion.
(init): Move here from posix-threads.h.
* include/posix-threads.h (destroy): removed.
From-SVN: r154265
Diffstat (limited to 'libjava/include/posix-threads.h')
-rw-r--r-- | libjava/include/posix-threads.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h index 806ee55..59e65f7 100644 --- a/libjava/include/posix-threads.h +++ b/libjava/include/posix-threads.h @@ -375,13 +375,6 @@ struct ParkHelper }; inline void -ParkHelper::init () -{ - pthread_mutex_init (&mutex, NULL); - pthread_cond_init (&cond, NULL); -} - -inline void ParkHelper::destroy () { pthread_mutex_destroy (&mutex); |