summaryrefslogtreecommitdiff
path: root/cpp/test/IceUtil/thread/MonitorMutexTest.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-04-19 00:30:06 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-04-19 00:30:06 +0000
commit5fe818e133abbf3feee85ba8dd726c71861f2cdc (patch)
tree86ee705e94bac8a2e7ab9d7de1511b6e818b1244 /cpp/test/IceUtil/thread/MonitorMutexTest.cpp
parentfixing copyright (diff)
downloadice-5fe818e133abbf3feee85ba8dd726c71861f2cdc.tar.bz2
ice-5fe818e133abbf3feee85ba8dd726c71861f2cdc.tar.xz
ice-5fe818e133abbf3feee85ba8dd726c71861f2cdc.zip
Fix for FC5
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();