2 //=============================================================================
4 * @file Reverse_Lock_Test.cpp
6 * This is a simple test to illustrate the functionality of
7 * ACE_Reverse_Lock. The test acquires and releases mutexes. No
8 * command line arguments are needed to run the test.
10 * @author Irfan Pyarali <irfan@cs.wustl.edu>
12 //=============================================================================
14 #include "test_config.h"
15 #include "ace/Synch_Traits.h"
16 #include "ace/Thread_Mutex.h"
17 #include "ace/Guard_T.h"
18 #include "ace/Reverse_Lock_T.h"
20 typedef ACE_Reverse_Lock
<ACE_SYNCH_MUTEX
> REVERSE_MUTEX
;
23 run_main (int, ACE_TCHAR
*[])
25 ACE_START_TEST (ACE_TEXT ("Reverse_Lock_Test"));
27 ACE_SYNCH_MUTEX mutex
;
28 REVERSE_MUTEX
reverse_mutex (mutex
);
31 ACE_GUARD_RETURN (ACE_SYNCH_MUTEX
, monitor
, mutex
, -1);
33 ACE_GUARD_RETURN (REVERSE_MUTEX
, reverse_monitor
, reverse_mutex
, -1);