3 //=============================================================================
7 * @author Frank Hunleth <fhunleth@cs.wustl.edu>
9 //=============================================================================
12 #ifndef TAO_RT_MUTEX_H
13 #define TAO_RT_MUTEX_H
15 #include /**/ "ace/pre.h"
16 #include "tao/orbconf.h"
18 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/RTCORBA/RTCORBA_includeC.h"
25 #include "tao/LocalObject.h"
27 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
28 # include "ace/SString.h"
29 #endif /* TAO_HAS_NAMED_RT_MUTEXES == 1 */
33 #pragma warning(disable:4250)
36 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
41 * @brief Abstract base class for the TAO RT Mutex implementations
43 * This class just serves as a base class for any of the TAO
44 * RT Mutex implementations. Instances of these classes should
45 * be created using the RTCORBA::create_mutex() method.
48 class TAO_RTCORBA_Export TAO_RT_Mutex
49 : public RTCORBA::Mutex
,
50 public ::CORBA::LocalObject
57 virtual void unlock ();
60 * Acquire the lock, but only wait up to @a max_wait time. Note
61 * that this operation may not be available on all OS platforms, so
62 * if you're interested in writing maximally portable programs avoid
63 * using this operation in your program designs.
65 virtual CORBA::Boolean
try_lock (TimeBase::TimeT max_wait
);
67 /// Returns the name of the mutex.
68 virtual const char *name () const;
71 virtual ~TAO_RT_Mutex ();
74 /// Synchronization lock.
78 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
80 * @class TAO_Named_RT_Mutex
82 * @brief Extension to TAO_RT_Mutex to support named mutexes.
84 class TAO_RTCORBA_Export TAO_Named_RT_Mutex
: public TAO_RT_Mutex
88 TAO_Named_RT_Mutex (const char *name
);
90 /// Returns the name of the mutex.
91 virtual const char *name () const;
97 #endif /* TAO_HAS_NAMED_RT_MUTEXES == 1 */
99 TAO_END_VERSIONED_NAMESPACE_DECL
101 #if defined(_MSC_VER)
103 #endif /* _MSC_VER */
105 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
107 #include /**/ "ace/post.h"
108 #endif /* TAO_RT_MUTEX_H */