summaryrefslogtreecommitdiff
path: root/cpp/test/IceUtil/thread/MonitorMutexTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceUtil/thread/MonitorMutexTest.cpp')
-rw-r--r--cpp/test/IceUtil/thread/MonitorMutexTest.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp
index 98ae8360222..e1a2dbb6d45 100644
--- a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp
+++ b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp
@@ -108,9 +108,19 @@ MonitorMutexTest::run()
{
Monitor<Mutex>::Lock lock(monitor);
- Monitor<Mutex>::TryLock tlock(monitor);
- test(!tlock.acquired());
-
+ try
+ {
+ Monitor<Mutex>::TryLock tlock(monitor);
+ test(!tlock.acquired());
+ }
+ catch(const ThreadLockedException&)
+ {
+ //
+ // pthread_mutex_trylock returns EDEADLK in FreeBSD's new threading implementation
+ // as well as in Fedora Core 5.
+ //
+ }
+
// TEST: Start thread, try to acquire the mutex.
t = new MonitorMutexTestThread(monitor);
control = t->start();