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
This commit is contained in:
committed by
Andrew Haley
parent
37740cd3af
commit
6bab028494
@@ -374,13 +374,6 @@ struct ParkHelper
|
||||
void unpark ();
|
||||
};
|
||||
|
||||
inline void
|
||||
ParkHelper::init ()
|
||||
{
|
||||
pthread_mutex_init (&mutex, NULL);
|
||||
pthread_cond_init (&cond, NULL);
|
||||
}
|
||||
|
||||
inline void
|
||||
ParkHelper::destroy ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user