diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-04 19:27:53 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-04 19:27:53 +0000 |
commit | afaa72956780c7ede0faeb838888a04463155faa (patch) | |
tree | 9daa46ec69210e3c701c865cb532d1727ea0e6c7 /ace/Synch_T.h | |
parent | 1cec78e1bc3af1d2a2fe2d30823c5c98f80a5ca3 (diff) | |
download | ATCD-afaa72956780c7ede0faeb838888a04463155faa.tar.gz |
ChangeLogTag: Wed Jul 04 14:26:10 2001 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'ace/Synch_T.h')
-rw-r--r-- | ace/Synch_T.h | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 827d4d1b3a4..b26bb7cd60e 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -104,6 +104,33 @@ private: }; /** + * @class ACE_Acquire_Method + * + * @brief An enum class. + * + * These enums should have been inside the reverse lock class, but + * some lame compilers cannot handle enums inside template classes. + * + * The METHOD_TYPE is used to indicate which acquire() method will be + * called on the real lock when the release() method is called on the + * reverse lock. REGULAR indicated the acquire() method, READ + * indicates the acquire_read() method, and WRITE indicates the + * acquire_write() method. Note that the try_*() methods are not + * represented here because we have to make sure that the release() + * method on the reverse lock acquires a lock on the real lock. + **/ +class ACE_Acquire_Method +{ +public: + enum METHOD_TYPE + { + ACE_REGULAR, + ACE_READ, + ACE_WRITE + }; +}; + +/** * @class ACE_Reverse_Lock * * @brief A reverse (or anti) lock. @@ -126,30 +153,13 @@ class ACE_Reverse_Lock : public ACE_Lock { public: - /** - * The ACE_ACQUIRE_METHOD is used to indicate which acquire() method - * will be called on the real lock when the release() method is - * called on the reverse lock. REGULAR indicated the acquire() - * method, READ indicates the acquire_read() method, and WRITE - * indicates the acquire_write() method. Note that the try_*() - * methods are not represented here because we have to make sure - * that the release() method on the reverse lock acquires a lock on - * the real lock. - **/ - enum ACE_ACQUIRE_METHOD - { - ACE_REGULAR, - ACE_READ, - ACE_WRITE - }; - typedef ACE_LOCKING_MECHANISM ACE_LOCK; // = Initialization/Finalization methods. /// Constructor. All locking requests will be forwarded to <lock>. ACE_Reverse_Lock (ACE_LOCKING_MECHANISM &lock, - ACE_ACQUIRE_METHOD acquire_method = ACE_REGULAR); + ACE_Acquire_Method::METHOD_TYPE acquire_method = ACE_Acquire_Method::ACE_REGULAR); /// Destructor. If <lock_> was not passed in by the user, it will be /// deleted. @@ -188,7 +198,7 @@ private: ACE_LOCKING_MECHANISM &lock_; /// This indicates what kind of acquire method will be called. - ACE_ACQUIRE_METHOD acquire_method_; + ACE_Acquire_Method::METHOD_TYPE acquire_method_; }; /** |