2 * @file Bug_3102_Regression_Test.cpp
4 * Reproduces the problems reported in bug 3102
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3102
8 #include "test_config.h"
10 #include "ace/Trace.h"
11 #include "ace/Thread_Mutex.h"
12 #include "ace/Managed_Object.h"
13 #include "ace/Guard_T.h"
14 #include "ace/OS_NS_stdio.h"
16 #if defined (ACE_HAS_THREADS)
20 ACE_MT(ACE_Thread_Mutex
*lock
=
21 ACE_Managed_Object
<ACE_Thread_Mutex
>::get_preallocated_object
22 (ACE_Object_Manager::ACE_THREAD_EXIT_LOCK
));
23 ACE_GUARD (ACE_Thread_Mutex
, ace_mon
, *lock
);
25 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Mutex'd!\n")));
28 #endif /* ACE_HAS_THREADS */
31 run_main (int, ACE_TCHAR
*[])
33 ACE_START_TEST (ACE_TEXT ("Bug_3102_Regression_Test"));
35 #if defined (ACE_HAS_THREADS)
36 ACE_Trace::start_tracing();
38 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Hello world!\n")));
42 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Done!\n")));
44 ACE_Trace::stop_tracing();
47 ACE_TEXT ("threads not supported on this platform\n")));
48 #endif /* ACE_HAS_THREADS */