Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.h (pthread_cond): New element cond_access to allow atomic broadcasts. * thread.cc (pthread_cond::pthread_cond): Initialise cond_access. (pthread_cond::~pthread_cond): Destroy cond_access. (pthread_cond::Broadcast): Use cond_access. (pthread_cond::Signal): Use cond_access. (pthread_cond_wait): Use cond_access. (pthread_cond_timedwait): Use cond_access.
This commit is contained in:
@@ -290,6 +290,8 @@ public:
|
||||
int shared;
|
||||
LONG waiting;
|
||||
pthread_mutex *mutex;
|
||||
/* to allow atomic behaviour for cond_broadcast */
|
||||
pthread_mutex_t cond_access;
|
||||
HANDLE win32_obj_id;
|
||||
int TimedWait (DWORD dwMilliseconds);
|
||||
void BroadCast ();
|
||||
|
Reference in New Issue
Block a user