00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_RT_MUTEX_H
00015 #define TAO_RT_MUTEX_H
00016
00017 #include "ace/pre.h"
00018 #include "tao/orbconf.h"
00019
00020 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 #include "tao/RTCORBA/RTCORBA_includeC.h"
00027 #include "tao/LocalObject.h"
00028
00029 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00030 # include "ace/SString.h"
00031 #endif
00032
00033 #if defined(_MSC_VER)
00034 #pragma warning(push)
00035 #pragma warning(disable:4250)
00036 #endif
00037
00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class TAO_RTCORBA_Export TAO_RT_Mutex
00052 : public RTCORBA::Mutex,
00053 public ::CORBA::LocalObject
00054 {
00055 public:
00056
00057
00058 virtual void lock (void);
00059
00060
00061 virtual void unlock (void);
00062
00063
00064
00065
00066
00067
00068
00069 virtual CORBA::Boolean try_lock (TimeBase::TimeT max_wait
00070 );
00071
00072
00073 virtual const char *name (void) const;
00074
00075 protected:
00076
00077
00078 virtual ~TAO_RT_Mutex (void);
00079
00080 protected:
00081
00082 TAO_SYNCH_MUTEX mu_;
00083 };
00084
00085 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00086
00087
00088
00089
00090
00091
00092 class TAO_RTCORBA_Export TAO_Named_RT_Mutex : public TAO_RT_Mutex
00093 {
00094 public:
00095
00096 TAO_Named_RT_Mutex (const char *name);
00097
00098
00099 virtual const char *name (void) const;
00100
00101 protected:
00102
00103
00104 ACE_CString name_;
00105 };
00106 #endif
00107
00108 TAO_END_VERSIONED_NAMESPACE_DECL
00109
00110 #if defined(_MSC_VER)
00111 #pragma warning(pop)
00112 #endif
00113
00114 #endif
00115
00116 #include "ace/post.h"
00117 #endif