From a8bd4340198433bc239495b91aa7f6080e0f5b46 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Wed, 9 Apr 2003 16:37:37 +0000 Subject: fixes for RH9 --- cpp/src/IceUtil/Cond.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'cpp/src/IceUtil/Cond.cpp') diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp index 24ab3bd414d..29b76783186 100644 --- a/cpp/src/IceUtil/Cond.cpp +++ b/cpp/src/IceUtil/Cond.cpp @@ -200,7 +200,23 @@ IceUtil::Cond::timedDowait(const Time& timeout) const IceUtil::Cond::Cond() { - int rc = pthread_cond_init(&_cond, 0); + int rc; + + pthread_condattr_t attr; + + rc = pthread_condattr_init(&attr); + if(rc != 0) + { + throw ThreadSyscallException(__FILE__, __LINE__); + } + + rc = pthread_cond_init(&_cond, &attr); + if(rc != 0) + { + throw ThreadSyscallException(__FILE__, __LINE__); + } + + rc = pthread_condattr_destroy(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__); -- cgit v1.2.3