diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-21 22:36:55 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-21 22:36:55 +0000 |
commit | 1a2aa490af423577c1549aa183a4584cce5f65e0 (patch) | |
tree | 5ed9e42d92164c48e24a96422cd5b36640dab74b | |
parent | 5b9138baef78ded4829a9bcf542ec423f045436f (diff) | |
download | ATCD-1a2aa490af423577c1549aa183a4584cce5f65e0.tar.gz |
ChangeLogTag:Wed Feb 21 19:27:14 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r-- | ACE/tests/Recursive_Mutex_Test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ACE/tests/Recursive_Mutex_Test.cpp b/ACE/tests/Recursive_Mutex_Test.cpp index 787e76f6ff3..f31cdb49c32 100644 --- a/ACE/tests/Recursive_Mutex_Test.cpp +++ b/ACE/tests/Recursive_Mutex_Test.cpp @@ -58,9 +58,16 @@ test_recursion_depth (int nesting_level, { if (nesting_level < n_iterations) { +#if !defined (ACE_HAS_WTHREADS) + // This will work for Windows, too, if ACE_TEST_MUTEX is + // ACE_Recursive_Thread_Mutex instead of ACE_Process_Mutex. + ACE_ASSERT (nesting_level == 0 + || nesting_level == rm->get_nesting_level ()); +#endif /* !ACE_HAS_WTHREADS */ int result = rm->acquire (); ACE_ASSERT (result == 0); #if !defined (ACE_HAS_WTHREADS) + ACE_ASSERT ((nesting_level + 1) == rm->get_nesting_level ()); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), @@ -70,6 +77,9 @@ test_recursion_depth (int nesting_level, test_recursion_depth (nesting_level + 1, rm); +#if !defined (ACE_HAS_WTHREADS) + ACE_ASSERT ((nesting_level + 1) == rm->get_nesting_level ()); +#endif /* !ACE_HAS_WTHREADS */ result = rm->release (); ACE_ASSERT (result == 0); #if !defined (ACE_HAS_WTHREADS) @@ -77,6 +87,8 @@ test_recursion_depth (int nesting_level, ACE_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), rm->get_thread_id ())); + ACE_ASSERT (nesting_level == 0 + || nesting_level == rm->get_nesting_level ()); #endif /* !ACE_HAS_WTHREADS */ } } |