00001 // -*- C++ -*- 00002 00003 /** 00004 * @file EC_Busy_Lock.h 00005 * 00006 * EC_Busy_Lock.h,v 1.11 2006/03/15 07:52:21 jtc Exp 00007 * 00008 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00009 * 00010 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and 00011 * other members of the DOC group. More details can be found in: 00012 * 00013 * http://doc.ece.uci.edu/~coryan/EC/index.html 00014 */ 00015 00016 #ifndef TAO_EC_BUSY_LOCK_H 00017 #define TAO_EC_BUSY_LOCK_H 00018 #include /**/ "ace/pre.h" 00019 00020 #include "ace/config-all.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 template<class Adaptee> 00029 class TAO_EC_Busy_Lock_Adapter 00030 { 00031 public: 00032 /// Constructor 00033 TAO_EC_Busy_Lock_Adapter (Adaptee* adaptee); 00034 00035 // = The ACE_Lock methods, please check $ACE_ROOT/ace/Synch.h for 00036 // details. 00037 00038 int remove (void); 00039 int acquire (void); 00040 int tryacquire (void); 00041 int release (void); 00042 int acquire_read (void); 00043 int acquire_write (void); 00044 int tryacquire_read (void); 00045 int tryacquire_write (void); 00046 00047 private: 00048 Adaptee* adaptee_; 00049 }; 00050 00051 TAO_END_VERSIONED_NAMESPACE_DECL 00052 00053 #if defined (__ACE_INLINE__) 00054 #include "orbsvcs/Event/EC_Busy_Lock.i" 00055 #endif /* __ACE_INLINE__ */ 00056 00057 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00058 #include "orbsvcs/Event/EC_Busy_Lock.cpp" 00059 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00060 00061 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00062 #pragma implementation ("EC_Busy_Lock.cpp") 00063 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00064 00065 #include /**/ "ace/post.h" 00066 #endif /* TAO_EC_BUSY_LOCK_H */