diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-04-19 00:30:06 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-04-19 00:30:06 +0000 |
commit | 5fe818e133abbf3feee85ba8dd726c71861f2cdc (patch) | |
tree | 86ee705e94bac8a2e7ab9d7de1511b6e818b1244 /cpp/test/IceUtil/thread/MonitorMutexTest.cpp | |
parent | fixing copyright (diff) | |
download | ice-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.cpp | 16 |
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(); |