diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-31 22:18:20 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-31 22:18:20 +0000 |
commit | 6d4337a975f11f01dcfd9b827be431fba0280768 (patch) | |
tree | a49c98ad0d34bcb5a87c9f7fb1a256c7bf4df6dd /ace | |
parent | faed5414aa90953190faaaacc4051b5f13d94dc1 (diff) | |
download | ATCD-6d4337a975f11f01dcfd9b827be431fba0280768.tar.gz |
ChangeLogTag:Sat Jul 31 12:07:48 1999 Douglas C. Schmidt <schmidt@mambo.cs.wustl.edu>
Diffstat (limited to 'ace')
83 files changed, 812 insertions, 688 deletions
diff --git a/ace/ACE.h b/ace/ACE.h index 88b74211d55..f28e1f6745f 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -701,9 +701,9 @@ private: // non-blocking status of <handle>). static u_int init_fini_count_; - // Counter to match init ()/fini () calls. init () must increment - // it; fini () must decrement it. fini () then does nothing until - // it reaches 0. + // Counter to match <init>/<fini> calls. <init> must increment it; + // <fini> must decrement it. <fini> then does nothing until it + // reaches 0. static size_t pagesize_; // Size of a VM page. diff --git a/ace/ARGV.h b/ace/ARGV.h index eb4a9593e47..4dcc762065c 100644 --- a/ace/ARGV.h +++ b/ace/ARGV.h @@ -38,26 +38,25 @@ public: // Converts <buf> into an <argv>-style vector of strings. If // <substitute_env_args> is enabled then we'll substitute the // environment variables for each $ENV encountered in the string. - // The subscript and argv() operations are not allowed on an + // The subscript and <argv> operations are not allowed on an // ACE_ARGV created this way. ACE_ARGV (ASYS_TCHAR *argv[], int substitute_env_args = 1); // Converts <argv> into a linear string. If <substitute_env_args> // is enabled then we'll substitute the environment variables for - // each $ENV encountered in the string. - // The buf() operation is not allowed on an ACE_ARGV created - // this way. + // each $ENV encountered in the string. The <buf> operation is not + // allowed on an ACE_ARGV created this way. ACE_ARGV (ASYS_TCHAR *first_argv[], ASYS_TCHAR *second_argv[], int substitute_env_args =1); // Creates an ACE_ARGV which is the concatenation of the first_argv // and the second argv. The argv arguments should be null pointer terminated. ACE_ARGV (int substitute_env_args = 1); - // Entry point for creating an ASYS_TCHAR *[] command line iteratively - // via the add() method. The argv() and buf() method calls are - // allowed, and the result is recreated when called multiple times. - // The subscript operator is not allowed. + // Entry point for creating an ASYS_TCHAR *[] command line + // iteratively via the <add> method. The <argv> and <buf> methods + // are allowed, and the result is recreated when called multiple + // times. The subscript operator is not allowed. ~ACE_ARGV (void); // Destructor. @@ -99,7 +98,7 @@ public: TO_PTR_ARRAY = 2, // ACE_ARGV converts ASYS_TCHAR *argv[] to buf[] ITERATIVE = 3 - // Builds buf[] or ASYS_TCHAR *argv[] iteratively with add() + // Builds buf[] or ASYS_TCHAR *argv[] iteratively with <add>. }; private: diff --git a/ace/Acceptor.h b/ace/Acceptor.h index d42360a35e8..615229f7cea 100644 --- a/ace/Acceptor.h +++ b/ace/Acceptor.h @@ -131,7 +131,7 @@ protected: virtual int activate_svc_handler (SVC_HANDLER *svc_handler); // Bridge method for activating a <svc_handler> with the appropriate // concurrency strategy. The default behavior of this method is to - // activate the SVC_HANDLER by calling its open() method (which + // activate the SVC_HANDLER by calling its <open> method (which // allows the SVC_HANDLER to define its own concurrency strategy). // However, subclasses can override this strategy to do more // sophisticated concurrency activations (such as making the diff --git a/ace/Asynch_IO_Impl.cpp b/ace/Asynch_IO_Impl.cpp index 9baab6f5e04..a3df938c1ec 100644 --- a/ace/Asynch_IO_Impl.cpp +++ b/ace/Asynch_IO_Impl.cpp @@ -11,4 +11,40 @@ #include "ace/Asynch_IO_Impl.i" #endif /* __ACE_INLINE__ */ +ACE_Asynch_Operation_Impl::~ACE_Asynch_Operation_Impl (void) +{ +} + +ACE_Asynch_Read_Stream_Impl::~ACE_Asynch_Read_Stream_Impl (void) +{ +} + +ACE_Asynch_Write_Stream_Impl::~ACE_Asynch_Write_Stream_Impl (void) +{ +} + +ACE_Asynch_Read_File_Impl::~ACE_Asynch_Read_File_Impl (void) +{ +} + +ACE_Asynch_Read_File_Result_Impl::~ACE_Asynch_Read_File_Result_Impl (void) +{ +} + +ACE_Asynch_Write_File_Result_Impl::~ACE_Asynch_Write_File_Result_Impl (void) +{ +} + +ACE_Asynch_Accept_Result_Impl::~ACE_Asynch_Accept_Result_Impl (void) +{ +} + +ACE_Asynch_Transmit_File_Impl::~ACE_Asynch_Transmit_File_Impl (void) +{ +} + +ACE_Asynch_Transmit_File_Result_Impl::~ACE_Asynch_Transmit_File_Result_Impl (void) +{ +} + #endif /* ACE_WIN32 || ACE_HAS_WINCE */ diff --git a/ace/Asynch_IO_Impl.h b/ace/Asynch_IO_Impl.h index 834817032b5..93d62490808 100644 --- a/ace/Asynch_IO_Impl.h +++ b/ace/Asynch_IO_Impl.h @@ -110,11 +110,8 @@ class ACE_Export ACE_Asynch_Operation_Impl // Abstract base class for all the concrete implementation // classes that provide different implementations for the // ACE_Asynch_Operation. - // - // = DESCRIPTION - // public: - virtual ~ACE_Asynch_Operation_Impl () {} + virtual ~ACE_Asynch_Operation_Impl (void); virtual int open (ACE_Handler &handler, ACE_HANDLE handle, @@ -177,7 +174,7 @@ class ACE_Export ACE_Asynch_Read_Stream_Result_Impl : public virtual ACE_Asynch_ // = DESCRIPTION // public: - virtual ~ACE_Asynch_Read_Stream_Result_Impl () {} + virtual ~ACE_Asynch_Read_Stream_Result_Impl (void); virtual u_long bytes_to_read (void) const = 0; // The number of bytes which were requested at the start of the @@ -231,7 +228,7 @@ class ACE_Export ACE_Asynch_Write_Stream_Result_Impl : public virtual ACE_Asynch // = DESCRIPTION // public: - virtual ~ACE_Asynch_Write_Stream_Result_Impl () {} + virtual ~ACE_Asynch_Write_Stream_Result_Impl (void); virtual u_long bytes_to_write (void) const = 0; // The number of bytes which were requested at the start of the @@ -259,7 +256,7 @@ class ACE_Export ACE_Asynch_Read_File_Impl : public virtual ACE_Asynch_Read_Stre // = DESCRIPTION // public: - virtual ~ACE_Asynch_Read_File_Impl () {} + virtual ~ACE_Asynch_Read_File_Impl (void); virtual int read (ACE_Message_Block &message_block, u_long bytes_to_read, @@ -298,7 +295,7 @@ class ACE_Export ACE_Asynch_Read_File_Result_Impl : public virtual ACE_Asynch_Re // = DESCRIPTION // public: - virtual ~ACE_Asynch_Read_File_Result_Impl () {} + virtual ~ACE_Asynch_Read_File_Result_Impl (void); // Destructor. protected: @@ -358,7 +355,7 @@ class ACE_Export ACE_Asynch_Write_File_Result_Impl : public virtual ACE_Asynch_W // = DESCRIPTION // public: - virtual ~ACE_Asynch_Write_File_Result_Impl () {} + virtual ~ACE_Asynch_Write_File_Result_Impl (void); protected: ACE_Asynch_Write_File_Result_Impl (void); @@ -410,7 +407,7 @@ class ACE_Export ACE_Asynch_Accept_Result_Impl : public virtual ACE_Asynch_Resul // = DESCRIPTION // public: - virtual ~ACE_Asynch_Accept_Result_Impl () {} + virtual ~ACE_Asynch_Accept_Result_Impl (void); virtual u_long bytes_to_read (void) const = 0; // The number of bytes which were requested at the start of the @@ -441,7 +438,7 @@ class ACE_Asynch_Transmit_File_Impl : public virtual ACE_Asynch_Operation_Impl // = DESCRIPTION // public: - virtual ~ACE_Asynch_Transmit_File_Impl () {} + virtual ~ACE_Asynch_Transmit_File_Impl (void); virtual int transmit_file (ACE_HANDLE file, ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer, @@ -471,7 +468,7 @@ class ACE_Export ACE_Asynch_Transmit_File_Result_Impl : public virtual ACE_Async // = DESCRIPTION // public: - virtual ~ACE_Asynch_Transmit_File_Result_Impl () {} + virtual ~ACE_Asynch_Transmit_File_Result_Impl (void); virtual ACE_HANDLE socket (void) const = 0; // Socket used for transmitting the file. diff --git a/ace/Based_Pointer_T.cpp b/ace/Based_Pointer_T.cpp index 0e97efcee87..fefe3421b32 100644 --- a/ace/Based_Pointer_T.cpp +++ b/ace/Based_Pointer_T.cpp @@ -8,22 +8,21 @@ #include "ace/Based_Pointer_Repository.h" # define ACE_TRACEX(X) ACE_Trace ____ (ASYS_TEXT (X), __LINE__, ASYS_TEXT (__FILE__)) -// # define ACE_TRACEX(X) -// #if !defined (__ACE_INLINE__) +#if !defined (__ACE_INLINE__) #include "ace/Based_Pointer_T.i" -// #endif /* __ACE_INLINE__ */ +#endif /* __ACE_INLINE__ */ template <class CONCRETE> ACE_INLINE ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (void) { - ACE_TRACEX ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); + ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); } template <class CONCRETE> void ACE_Based_Pointer_Basic<CONCRETE>::dump (void) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::dump"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntarget_ = %d\n"), this->target_)); @@ -36,7 +35,7 @@ template <class CONCRETE> ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (CONCRETE *initial) : ACE_Based_Pointer_Basic<CONCRETE> (initial) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); } template <class CONCRETE> @@ -44,7 +43,7 @@ ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (void) : target_ (0), base_offset_ (0) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); void *base_addr = 0; // Find the base address associated with our <this> pointer. Note @@ -53,7 +52,6 @@ ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (void) ACE_BASED_POINTER_REPOSITORY::instance ()->find (this, base_addr); this->base_offset_ = (char *) this - (char *) base_addr; - this->dump (); } template <class CONCRETE> @@ -61,23 +59,30 @@ ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (CONCRETE *rhs) : target_ (0), base_offset_ (0) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); - void *base_addr = 0; - - // Find the base address associated with the <addr> pointer. Note - // that it's ok for <find> to return 0, which simply indicates that - // the address is not in memory-mapped virtual address space. - ACE_BASED_POINTER_REPOSITORY::instance ()->find (this, - base_addr); - this->base_offset_ = (char *) this - (char *) base_addr; - this->target_ = ((char *) rhs - (char *) base_addr); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); + + if (rhs == 0) + // Store a value of <target_> that indicate "NULL" pointer. + this->target_ = -1; + else + { + void *base_addr = 0; + + // Find the base address associated with the <addr> pointer. + // Note that it's ok for <find> to return 0, which simply + // indicates that the address is not in memory-mapped virtual + // address space. + ACE_BASED_POINTER_REPOSITORY::instance ()->find (this, + base_addr); + this->base_offset_ = (char *) this - (char *) base_addr; + this->target_ = ((char *) rhs - (char *) base_addr); + } } template <class CONCRETE> ACE_INLINE ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); ACE_ASSERT (!"not implemented"); void *base_addr = 0; @@ -89,15 +94,14 @@ ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (const ACE_Based_Poin base_addr); this->base_offset_ = (char *) this - (char *) base_addr; this->target_ = ((char *) &rhs - (char *) base_addr); - this->dump (); } template <class CONCRETE> ACE_INLINE ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE> &rhs) : ACE_Based_Pointer_Basic<CONCRETE> (rhs) { - ACE_TRACEX ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); + ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); ACE_ASSERT (!"not implemented"); } -#endif/* ACE_BASED_POINTER_T_CPP */ +#endif /* ACE_BASED_POINTER_T_CPP */ diff --git a/ace/Based_Pointer_T.h b/ace/Based_Pointer_T.h index 0753b1980e5..82c40e2a87d 100644 --- a/ace/Based_Pointer_T.h +++ b/ace/Based_Pointer_T.h @@ -165,7 +165,7 @@ public: }; #if defined (__ACE_INLINE__) -// #include "ace/Based_Pointer_T.i" +#include "ace/Based_Pointer_T.i" #endif /* __ACE_INLINE__ */ #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/ace/Based_Pointer_T.i b/ace/Based_Pointer_T.i index c37d3a894d9..4409abf03b0 100644 --- a/ace/Based_Pointer_T.i +++ b/ace/Based_Pointer_T.i @@ -6,35 +6,38 @@ template <class CONCRETE> ACE_INLINE CONCRETE * ACE_Based_Pointer<CONCRETE>::operator->(void) { - ACE_TRACEX ("ACE_Based_Pointer<CONCRETE>::operator->"); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator->"); return (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this)); } template <class CONCRETE> ACE_INLINE void ACE_Based_Pointer_Basic<CONCRETE>::operator = (CONCRETE *rhs) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator="); - if (rhs != 0) + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator="); + if (rhs == 0) + // Store a value of <target_> that indicate "NULL" pointer. + this->target_ = -1; + else this->target_ = ((char *) rhs - ((char *) this - this->base_offset_)); - this->dump (); } template <class CONCRETE> ACE_INLINE void ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs) { - ACE_TRACEX ("ACE_Based_Pointer<CONCRETE>::operator="); - this->target_ = ((char *) rhs - - ((char *) this - this->base_offset_)); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator="); + if (rhs == 0) + // Store a value of <target_> that indicate "NULL" pointer. + this->target_ = -1; + else + this->target_ = ((char *) rhs + - ((char *) this - this->base_offset_)); } template <class CONCRETE> ACE_INLINE CONCRETE ACE_Based_Pointer_Basic<CONCRETE>::operator *(void) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator *"); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator *"); return *ACE_reinterpret_cast (CONCRETE *, ACE_COMPUTE_BASED_POINTER (this)); } @@ -42,17 +45,18 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator *(void) const template <class CONCRETE> ACE_INLINE CONCRETE * ACE_Based_Pointer_Basic<CONCRETE>::addr (void) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::addr"); - this->dump (); - return ACE_reinterpret_cast (CONCRETE *, - ACE_COMPUTE_BASED_POINTER (this)); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::addr"); + if (this->target_ == -1) + return 0; + else + return ACE_reinterpret_cast (CONCRETE *, + ACE_COMPUTE_BASED_POINTER (this)); } template <class CONCRETE> ACE_INLINE CONCRETE ACE_Based_Pointer_Basic<CONCRETE>::operator [] (long index) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator[]"); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator[]"); CONCRETE *c = ACE_reinterpret_cast (CONCRETE *, ACE_COMPUTE_BASED_POINTER (this)); return c[index]; @@ -61,56 +65,49 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator [] (long index) const template <class CONCRETE> ACE_INLINE void ACE_Based_Pointer_Basic<CONCRETE>::operator += (long index) { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator+="); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator+="); this->base_offset_ += (index * sizeof (CONCRETE)); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator == (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator=="); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator=="); return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator != (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator!="); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator!="); return !(*this == rhs); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator < (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator<"); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<"); return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator<="); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<="); return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator > (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator>"); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>"); return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE int ACE_Based_Pointer_Basic<CONCRETE>::operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const { - ACE_TRACEX ("ACE_Based_Pointer_Basic<CONCRETE>::operator>="); - this->dump (); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>="); return ACE_COMPUTE_BASED_POINTER (this) >= ACE_COMPUTE_BASED_POINTER (&rhs); } diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h index 13dad9d7ab5..72a476628c1 100644 --- a/ace/CDR_Stream.h +++ b/ace/CDR_Stream.h @@ -450,9 +450,9 @@ private: // to be packed with the right alignment restrictions. It is mostly // designed for buffers of the basic types. // - // This operation uses memcpy(); as explained above it is expected - // that using assignment is faster that memcpy() for one element, - // but for several elements memcpy() should be more efficient, it + // This operation uses <memcpy>; as explained above it is expected + // that using assignment is faster that <memcpy> for one element, + // but for several elements <memcpy> should be more efficient, it // could be interesting to find the break even point and optimize // for that case, but that would be too platform dependent. @@ -474,7 +474,7 @@ private: char *&buf); // Grow the CDR stream. When it returns <buf> contains a pointer to // memory in the CDR stream, with at least <size> bytes ahead of it - // and aligned to an <align> boundary. It moved the wr_ptr() to <buf + // and aligned to an <align> boundary. It moved the <wr_ptr> to <buf // + size>. int do_byte_swap (void) const; @@ -701,9 +701,9 @@ public: // CDR stream from a socket or file. int grow (size_t newsize); - // Grow the internal buffer, reset rd_ptr() to the first byte in the - // new buffer that is properly aligned, and set wr_ptr() to - // rd_ptr() + newsize + // Grow the internal buffer, reset <rd_ptr> to the first byte in the + // new buffer that is properly aligned, and set <wr_ptr> to <rd_ptr> + // + newsize void reset_byte_order (int byte_order); // After reading and partially parsing the contents the user can @@ -789,9 +789,9 @@ private: // to be packed with the right alignment restrictions. It is mostly // designed for buffers of the basic types. // - // This operation uses memcpy(); as explained above it is expected - // that using assignment is faster that memcpy() for one element, - // but for several elements memcpy() should be more efficient, it + // This operation uses <memcpy>; as explained above it is expected + // that using assignment is faster that <memcpy> for one element, + // but for several elements <memcpy> should be more efficient, it // could be interesting to find the break even point and optimize // for that case, but that would be too platform dependent. diff --git a/ace/CORBA_Handler.h b/ace/CORBA_Handler.h index 5ca803b94a6..428127bcd75 100644 --- a/ace/CORBA_Handler.h +++ b/ace/CORBA_Handler.h @@ -117,10 +117,10 @@ public: // = Dynamic linking hooks. virtual int suspend (void); - // Atomically suspend all the threads associated with the <thr_mgr ()>. + // Atomically suspend all the threads associated with the <thr_mgr>. virtual int resume (void); - // Atomically resume all the threads associated with the <thr_mgr ()_>. + // Atomically resume all the threads associated with the <thr_mgr>. // = Iterations dictate # of <processNextEvent> calls per-callback. size_t iterations (void); @@ -138,7 +138,7 @@ public: protected: void get_orbix_descriptors (void); // Preinitialize any descriptors that Orbix is using. This is - // called in instance (). + // called in <instance>. ACE_ST_CORBA_Handler (void); // Constructors (ensure Singleton...). @@ -156,7 +156,7 @@ protected: // ACE_ST_CORBA_Handler is a singleton object. size_t iterations_; - // Number of iterations to process per processNextEvent() call. + // Number of iterations to process per <processNextEvent> call. }; #if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0) @@ -193,10 +193,10 @@ public: // = Dynamic linking hooks. virtual int suspend (void); - // Atomically suspend all the threads associated with the <thr_mgr ()>. + // Atomically suspend all the threads associated with the <thr_mgr>. virtual int resume (void); - // Atomically resume all the threads associated with the <thr_mgr ()>. + // Atomically resume all the threads associated with the <thr_mgr>. void dump (void) const; // Dump the state of an object. @@ -216,8 +216,8 @@ protected: virtual int inRequestPreMarshal (ACE_CORBA_1 (Request) &r, ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment)); - // Take the incoming request and pass it to this->handle_input() but - // through the Reactor. + // Take the incoming request and pass it to <handle_input> through + // the Reactor. static ACE_MT_CORBA_Handler *instance_; // ACE_MT_CORBA_Handler is a singleton object. diff --git a/ace/CORBA_Ref.h b/ace/CORBA_Ref.h index e5dbc821641..c38887ef1c9 100644 --- a/ace/CORBA_Ref.h +++ b/ace/CORBA_Ref.h @@ -45,10 +45,10 @@ public: ACE_CORBA_Ref (CORBA_REF *ref); // Contruction with an orbix ref. - // performs a ref->_duplicate(). + // performs a <CORBA_REF::_duplicate>. CORBA_REF *operator= (CORBA_REF *ref); - // Assignment performs a ref->_duplicate(). + // Assignment performs a <CORBA_REF::_duplicate>. operator CORBA_REF *(void) const; // Type operator @@ -64,7 +64,7 @@ public: // Pointer comparison. ~ACE_CORBA_Ref (void); - // Destruction: calls ref_->_release + // Destruction: calls <CORBA_REF::_release>. private: CORBA_REF *ref_; diff --git a/ace/Caching_Utility_T.h b/ace/Caching_Utility_T.h index 966bca32b9f..cb036782343 100644 --- a/ace/Caching_Utility_T.h +++ b/ace/Caching_Utility_T.h @@ -32,14 +32,14 @@ class ACE_Pair_Caching_Utility // Defines a helper class for the Caching Strategies. // // = DESCRIPTION - // This class defines the methods commonly used by the different - // caching strategies. For instance: clear_cache () method which - // decides and purges the entry from the container. Note: This - // class helps in the caching_strategies using a container - // containing entries of <KEY, ACE_Pair<VALUE, attributes>> - // kind. The attributes helps in deciding the entries to be - // purged. The Cleanup_Strategy is the callback class to which - // the entries to be cleaned up will be delegated. + // This class defines the methods commonly used by the different + // caching strategies. For instance: <clear_cache> method which + // decides and purges the entry from the container. Note: This + // class helps in the caching_strategies using a container + // containing entries of <KEY, ACE_Pair<VALUE, attributes>> + // kind. The attributes helps in deciding the entries to be + // purged. The Cleanup_Strategy is the callback class to which the + // entries to be cleaned up will be delegated. public: typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY; @@ -84,7 +84,7 @@ class ACE_Recyclable_Handler_Caching_Utility // // = DESCRIPTION // This class defines the methods commonly used by the different - // caching strategies. For instance: clear_cache () method which + // caching strategies. For instance: <clear_cache> method which // decides and purges the entry from the container. Note: This // class helps in the caching_strategies using a container // containing entries of <KEY, Svc_Handler> kind. The attributes @@ -136,7 +136,7 @@ class ACE_Handler_Caching_Utility // // = DESCRIPTION // This class defines the methods commonly used by the different - // caching strategies. For instance: clear_cache () method which + // caching strategies. For instance: <clear_cache> method which // decides and purges the entry from the container. Note: This // class helps in the caching_strategies using a container // containing entries of <KEY, HANDLER> kind where the HANDLER @@ -190,7 +190,7 @@ class ACE_Null_Caching_Utility // // = DESCRIPTION // This class defines the methods commonly used by the different - // caching strategies. For instance: clear_cache () method which + // caching strategies. For instance: <clear_cache> method which // decides and purges the entry from the container. Note: This // class is be used with the Null_Caching_Strategy. The // Cleanup_Strategy is the callback class to which the entries to diff --git a/ace/Connector.h b/ace/Connector.h index d01dc24d1e2..ddabc7351a4 100644 --- a/ace/Connector.h +++ b/ace/Connector.h @@ -245,7 +245,7 @@ protected: virtual int activate_svc_handler (SVC_HANDLER *svc_handler); // Bridge method for activating a <svc_handler> with the appropriate // concurrency strategy. The default behavior of this method is to - // activate the SVC_HANDLER by calling its open() method (which + // activate the SVC_HANDLER by calling its <open> method (which // allows the SVC_HANDLER to define its own concurrency strategy). // However, subclasses can override this strategy to do more // sophisticated concurrency activations (such as creating the @@ -311,7 +311,7 @@ protected: int reuse_addr, int flags, int perms); - // Implementation the connect() methods + // Implementation the <connect> methods. MAP_MANAGER handler_map_; // Lookup table that maps an I/O handle to a SVC_HANDLER *. diff --git a/ace/Containers_T.h b/ace/Containers_T.h index 81e0e07e9c7..410c1d23306 100644 --- a/ace/Containers_T.h +++ b/ace/Containers_T.h @@ -479,11 +479,11 @@ public: int get (T *&item, size_t slot = 0) const; // Get the <slot>th element in the set. Returns -1 if the element - // isn't in the range <0..size() - 1>, else 0. + // isn't in the range {0..<size> - 1}, else 0. int set (const T &item, size_t slot); // Set the <slot>th element in the set. Will pad out the set with - // empty nodes if <slot> is beyond the range <0..size() - 1>. + // empty nodes if <slot> is beyond the range {0..<size> - 1}. // Returns -1 on failure, 0 if <slot> isn't initially in range, and // 0 otherwise. @@ -638,10 +638,10 @@ public: // items in the list have been seen, else 1. T* advance_and_remove (int dont_remove); - // Advance the iterator while removing the original item from the list. - // Return a pointer points to the original (removed) item. If - // <dont_remove> equals 0, this function behaves like advance() but - // return 0 (NULL) instead. + // Advance the iterator while removing the original item from the + // list. Return a pointer points to the original (removed) item. + // If <dont_remove> equals 0, this function behaves like <advance> + // but return 0 (NULL) instead. // = STL-style iteration methods @@ -701,10 +701,10 @@ public: // items in the list have been seen, else 1. T* advance_and_remove (int dont_remove); - // Advance the iterator while removing the original item from the list. - // Return a pointer points to the original (removed) item. If - // <dont_remove> equals 0, this function behaves like advance() but - // return 0 (NULL) instead. + // Advance the iterator while removing the original item from the + // list. Return a pointer points to the original (removed) item. + // If <dont_remove> equals 0, this function behaves like <advance> + // but return 0 (NULL) instead. // = STL-style iteration methods @@ -798,7 +798,7 @@ public: int get (T *&item, size_t slot = 0); // Get the <slot>th element in the set. Returns -1 if the element - // isn't in the range <0..size() - 1>, else 0. + // isn't in the range {0..<size> - 1}, else 0. size_t size (void) const; // The number of items in the queue. @@ -970,7 +970,7 @@ public: // DEPRECATED int remove (void); - // Removes the current item (i.e., this->next()) from the list. + // Removes the current item (i.e., <next>) from the list. void dump (void) const; // Delegates to ACE_Double_Linked_List_Iterator. @@ -1021,7 +1021,7 @@ public: // DEPRECATED int remove (void); - // Removes the current item (i.e., this->next()) from the list. + // Removes the current item (i.e., <next>) from the list. void dump (void) const; // Delegates to ACE_Double_Linked_List_Iterator. @@ -1765,7 +1765,7 @@ public: int operator== (const ACE_Array<T> &s) const; // Compare this array with <s> for equality. Two arrays are equal - // if their size()'s are equal and all the elements from 0 .. size() + // if their <size>'s are equal and all the elements from 0 .. <size> // are equal. int operator!= (const ACE_Array<T> &s) const; diff --git a/ace/DEV_Connector.h b/ace/DEV_Connector.h index 088fd8be1df..db2173dd5b3 100644 --- a/ace/DEV_Connector.h +++ b/ace/DEV_Connector.h @@ -51,7 +51,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int connect (ACE_DEV_IO &new_io, @@ -74,7 +74,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int reset_new_handle (ACE_HANDLE handle); diff --git a/ace/Dirent.h b/ace/Dirent.h index f606c77fc1b..5f7ad9ad7e1 100644 --- a/ace/Dirent.h +++ b/ace/Dirent.h @@ -60,7 +60,7 @@ public: // whether entries are returned for dot or dot-dot. The pointer // returned by <readdir> points to data that may be overwritten by // another call to <readdir> on the same directory stream. This - // data shall not be overwritten by another call to readdir() on a + // data shall not be overwritten by another call to <readdir> on a // different directory stream. <readdir> may buffer several // directory entries per actual read operation; <readdir> marks for // update the st_atime field of the directory each time the diff --git a/ace/Dump.h b/ace/Dump.h index 2f44c2795c3..1bb165d0eb9 100644 --- a/ace/Dump.h +++ b/ace/Dump.h @@ -135,7 +135,8 @@ private: // subobject corresponding to the base class is destroyed (hence // on destruction of the subobject its handle won't exist anymore // and we'll have to check for that). - Tuple() : dumper_(0) {} + + Tuple (void) : dumper_(0) {} }; static ACE_ODB *instance_; diff --git a/ace/Env_Value_T.h b/ace/Env_Value_T.h index 726d1c7b4bb..69da5351c51 100644 --- a/ace/Env_Value_T.h +++ b/ace/Env_Value_T.h @@ -40,7 +40,7 @@ public: ACE_Env_Value (void); // Default constructor which isn't bound to a specific environment // variable name or a default value. Before being useful it must - // <open()>ed. + // <open>'d. ACE_Env_Value (const ASYS_TCHAR *varname, const T &vardefault); diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h index ece9adf8715..410755d24eb 100644 --- a/ace/Event_Handler.h +++ b/ace/Event_Handler.h @@ -125,7 +125,7 @@ public: #if !defined (ACE_HAS_WINCE) static void *read_adapter (void *event_handler); // Used to read from non-socket ACE_HANDLEs in our own thread to - // work around Win32 limitations that don't allow us to select() on + // work around Win32 limitations that don't allow us to <select> on // non-sockets (such as ACE_STDIN). This is commonly used in // situations where the Reactor is used to demultiplex read events // on ACE_STDIN on UNIX. Note that <event_handler> must be a @@ -138,7 +138,7 @@ public: ACE_Thread_Manager *thr_mgr, int flags = THR_DETACHED); // Abstracts away from the differences between Win32 and ACE with - // respect to reading from ACE_STDIN (which is non-select()'able on + // respect to reading from ACE_STDIN (which is non-<select>'able on // Win32. static int remove_stdin_handler (ACE_Reactor *reactor, diff --git a/ace/Filecache.h b/ace/Filecache.h index 8a392c6f290..ff5f8194d47 100644 --- a/ace/Filecache.h +++ b/ace/Filecache.h @@ -143,7 +143,7 @@ private: // A reference to the low level instance. ACE_HANDLE handle_; - // A dup()'d version of the one from this->file_. + // A <dup>'d version of the one from <file_>. int mapit_; }; diff --git a/ace/Free_List.h b/ace/Free_List.h index 44a9ef0e3e0..837e43f1207 100644 --- a/ace/Free_List.h +++ b/ace/Free_List.h @@ -60,9 +60,10 @@ class ACE_Locked_Free_List : public ACE_Free_List<T> // Implements a free list. // // = DESCRIPTION - // This class maintains a free list of nodes of type T. It depends on - // the type T having a get_next () and set_next () method. It maintains - // a mutex so the freelist can be used in a multithreaded program . + // This class maintains a free list of nodes of type T. It + // depends on the type T having a <get_next> and <set_next> + // method. It maintains a mutex so the freelist can be used in + // a multithreaded program . public: // = Initialization and termination. ACE_Locked_Free_List (int mode = ACE_FREE_LIST_WITH_POOL, diff --git a/ace/Functor_T.cpp b/ace/Functor_T.cpp index 42fafc62c74..89e3815df87 100644 --- a/ace/Functor_T.cpp +++ b/ace/Functor_T.cpp @@ -1,33 +1,6 @@ /* -*- C++ -*- */ // $Id$ -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Functor_T.cpp -// -// = DESCRIPTION -// Non-inlinable method definitions for templatized classes -// implementing the GOF Command Pattern, or STL-style functors. -// -// = AUTHOR -// Chris Gill <cdgill@cs.wustl.edu> -// -// Based on Command Pattern implementations originally done by -// -// Carlos O'Ryan <coryan@cs.wustl.edu> and -// Douglas C. Schmidt <schmidt@cs.wustl.edu> and -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> -// -// and on STL-style functor implementations originally done by -// -// Irfan Pyarali <irfan@cs.wustl.edu> -// -// ============================================================================ - #ifndef ACE_FUNCTOR_T_C #define ACE_FUNCTOR_T_C @@ -46,7 +19,6 @@ ACE_RCSID(ace, Functor_T, "$Id$") ACE_ALLOC_HOOK_DEFINE(ACE_Command_Callback) - /////////////////////////////////// // GOF Command Pattern Templates // /////////////////////////////////// @@ -61,6 +33,11 @@ ACE_Command_Callback<RECEIVER, ACTION>::ACE_Command_Callback (RECEIVER &recvr, { } +template <class RECEIVER, class ACTION> +ACE_Command_Callback<RECEIVER, ACTION>::~ACE_Command_Callback (void) +{ +} + // Invokes an operation. template <class RECEIVER, class ACTION> int diff --git a/ace/Functor_T.h b/ace/Functor_T.h index 238cea27650..5cfd4a5601f 100644 --- a/ace/Functor_T.h +++ b/ace/Functor_T.h @@ -10,25 +10,26 @@ // Functor_T.h // // = DESCRIPTION -// Templatized classes for implementing function objects that are used in -// various places in ACE. There are currently two major categories of -// function objects in ACE: GOF Command Pattern objects, and STL-style -// functors for comparison of container elements. The command objects -// are invoked via an execute () method, while the STL-style functors are -// invoked via an operator() () method. +// Templatized classes for implementing function objects that are +// used in various places in ACE. There are currently two major +// categories of function objects in ACE: GOF Command Pattern +// objects, and STL-style functors for comparison of container +// elements. The command objects are invoked via an <execute> +// method, while the STL-style functors are invoked via an +// <operator()> method. // // = AUTHOR -// Chris Gill <cdgill@cs.wustl.edu> +// Chris Gill <cdgill@cs.wustl.edu> // // Based on Command Pattern implementations originally done by // -// Carlos O'Ryan <coryan@cs.wustl.edu> and -// Douglas C. Schmidt <schmidt@cs.wustl.edu> and -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> +// Carlos O'Ryan <coryan@cs.wustl.edu>, +// Douglas C. Schmidt <schmidt@cs.wustl.edu>, and +// Sergio Flores-Gaitan <sergio@cs.wustl.edu> // -// and on STL-style functor implementations originally done by +// and on STL-style functor implementations originally done by // -// Irfan Pyarali <irfan@cs.wustl.edu> +// Irfan Pyarali <irfan@cs.wustl.edu> // // ============================================================================ @@ -49,9 +50,9 @@ template <class RECEIVER, class ACTION> class ACE_Command_Callback : public ACE_Command_Base { // = TITLE - // Defines a class template that allows us to invoke a GOF command style - // callback to an object without knowing anything about the object except - // its type. + // Defines a class template that allows us to invoke a GOF + // command style callback to an object without knowing anything + // about the object except its type. // // = DESCRIPTION // This class declares an interface to execute operations, @@ -59,19 +60,17 @@ class ACE_Command_Callback : public ACE_Command_Base // how to implement the operation. A class can invoke operations // without knowing anything about it, or how it was implemented. public: - ACE_Command_Callback (RECEIVER &recvr, ACTION action); // Constructor: sets the <receiver_> of the Command to recvr, and the // <action_> of the Command to <action>. - virtual ~ACE_Command_Callback (void) {} + virtual ~ACE_Command_Callback (void); // Virtual destructor. virtual int execute (void *arg = 0); // Invokes the method <action_> from the object <receiver_>. private: - RECEIVER &receiver_; // Object where the method resides. @@ -87,9 +86,7 @@ template <class TYPE> class ACE_Hash { // = TITLE - // // Function object for hashing - // public: u_long operator () (const TYPE &t) const; // Simply calls t.hash () @@ -99,9 +96,7 @@ template <class TYPE> class ACE_Pointer_Hash { // = TITLE - // // Function object for hashing pointers - // public: u_long operator () (TYPE t) const; // Simply returns t. @@ -111,10 +106,8 @@ template <class TYPE> class ACE_Equal_To { // = TITLE - // // Function object for comparing two objects of // the given type for equality. - // public: int operator () (const TYPE &lhs, const TYPE &rhs) const; @@ -125,10 +118,9 @@ template <class TYPE> class ACE_Less_Than { // = TITLE - // - // Function object for determining whether the first object of the - // given type is less than the second object of the same type. - // + // Function object for determining whether the first object of + // the given type is less than the second object of the same + // type. public: int operator () (const TYPE &lhs, const TYPE &rhs) const; diff --git a/ace/Functor_T.i b/ace/Functor_T.i index 52e38166dac..d626f76ed15 100644 --- a/ace/Functor_T.i +++ b/ace/Functor_T.i @@ -1,38 +1,6 @@ /* -*- C++ -*- */ // $Id$ -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Functor_T.i -// -// = DESCRIPTION -// Inlinable method definitions for templatized classes -// implementing the GOF Command Pattern, or STL-style functors. -// -// = AUTHOR -// Chris Gill <cdgill@cs.wustl.edu> -// -// Based on Command Pattern implementations originally done by -// -// Carlos O'Ryan <coryan@cs.wustl.edu> and -// Douglas C. Schmidt <schmidt@cs.wustl.edu> and -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> -// -// and on STL-style functor implementations originally done by -// -// Irfan Pyarali <irfan@cs.wustl.edu> -// -// ============================================================================ - - -///////////////////////////////// -// STL-style Functor Templates // -///////////////////////////////// - template <class TYPE> ACE_INLINE u_long ACE_Hash<TYPE>::operator () (const TYPE &t) const { @@ -56,5 +24,5 @@ template <class TYPE> ACE_INLINE int ACE_Less_Than<TYPE>::operator () (const TYPE &lhs, const TYPE &rhs) const { - return (lhs < rhs) ? 1 : 0; + return lhs < rhs ? 1 : 0; } diff --git a/ace/Future.h b/ace/Future.h index 184eb08f462..70778d40ac8 100644 --- a/ace/Future.h +++ b/ace/Future.h @@ -290,7 +290,7 @@ public: void dump (void) const; // Dump the state of an object. - ACE_Future_Rep<T> *get_rep (); + ACE_Future_Rep<T> *get_rep (void); // Get the underlying <ACE_Future_Rep>*. Note that this method should // rarely, if ever, be used and that modifying the undlerlying <ACE_Future_Rep>* // should be done with extreme caution. diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h index 4a591b56503..2829e2b5747 100644 --- a/ace/High_Res_Timer.h +++ b/ace/High_Res_Timer.h @@ -33,9 +33,9 @@ class ACE_Export ACE_High_Res_Timer // = DESCRIPTION // Most of the member functions don't return values. The only // reason that one would fail is if high-resolution time isn't - // supported on the platform. To avoid impacting performance and - // complicating the interface, in that case, ACE_OS::gettimeofday () - // is used instead. + // supported on the platform. To avoid impacting performance + // and complicating the interface, in that case, + // <ACE_OS::gettimeofday> is used instead. // // The global scale factor is required for platforms that have // high-resolution timers that return units other than @@ -44,7 +44,7 @@ class ACE_Export ACE_High_Res_Timer // and is used by all instances of High Res Timer. The member // functions that return or print times use the global scale // factor. They divide the "time" that they get from - // ACE_OS::gethrtime () by global_scale_factor_ to obtain the + // <ACE_OS::gethrtime> by global_scale_factor_ to obtain the // time in microseconds. Its units are therefore 1/microsecond. // On Solaris, a scale factor of 1000 should be used because its // high-resolution timer returns nanoseconds. However, on Intel @@ -56,11 +56,11 @@ class ACE_Export ACE_High_Res_Timer // NOTE: the elapsed time calculations in the print methods use // ACE_hrtime_t values. Those methods do _not_ check for overflow! // - // NOTE: Gabe <begeddov@proaxis.com> raises this issue - // regarding ACE_OS::gethrtime (): on multi-processors, the - // processor that you query for your timer.stop () value might - // not be the one you queried for timer.start (). Its not clear - // how much divergence there would be, if any. + // NOTE: Gabe <begeddov@proaxis.com> raises this issue regarding + // <ACE_OS::gethrtime>: on multi-processors, the processor that + // you query for your <timer.stop> value might not be the one + // you queried for <timer.start>. Its not clear how much + // divergence there would be, if any. // // This issue is not mentioned in the Solaris 2.5.1 gethrtime // man page. @@ -149,8 +149,8 @@ public: void print_total (const char *message, const int iterations = 1, ACE_HANDLE handle = ACE_STDOUT) const; - // Print total time. NOTE: only use print_total () - // if incremental timings had been used! + // Print total time. NOTE: only use <print_total> if incremental + // timings had been used! void print_ave (const char *message, const int iterations = 1, @@ -166,17 +166,17 @@ public: static ACE_Time_Value gettimeofday (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); - // THIS FUNCTION IS DEPRECATED. PLEASE USE ACE_OS::gettimeofday () - // INSTEAD! - // Calls ACE_High_Res_Timer::hrtime_to_tv passing ACE_OS::gethrtime. - // This function can be used to parameterize objects such as - // ACE_Timer_Queue::gettimeofday. If global_scale_factor_ is not - // set, and we're on a platform that requires global_scale_factor_ - // (e.g., Win32), ACE_OS::gettimeofday will be used instead of - // ACE_OS::gethrtime. This allows applications on Intel to use - // High_Res_Timer even when global_scale_factor is not set. - // However, setting the global_scale_factor_ appropriately will - // result in the finest resolution possible. + // THIS FUNCTION IS DEPRECATED. PLEASE USE <ACE_OS::gettimeofday> + // INSTEAD! Calls <ACE_High_Res_Timer::hrtime_to_tv> passing + // <ACE_OS::gethrtime>. This function can be used to parameterize + // objects such as <ACE_Timer_Queue::gettimeofday>. If + // <global_scale_factor_> is not set, and we're on a platform that + // requires <global_scale_factor_> (e.g., Win32), + // ACE_OS::gettimeofday will be used instead of <ACE_OS::gethrtime>. + // This allows applications on Intel to use <High_Res_Timer> even + // when <global_scale_factor> is not set. However, setting the + // <global_scale_factor_> appropriately will result in the finest + // resolution possible. static void hrtime_to_tv (ACE_Time_Value &tv, const ACE_hrtime_t hrt); @@ -193,9 +193,9 @@ private: static ACE_hrtime_t gettime (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); // For internal use: gets the high-resolution time using - // ACE_OS::gethrtime (). Except on platforms that require that the - // global_scale_factor_ be set, such as ACE_WIN32, uses the - // low-resolution clock if the global_scale_factor_ has not been + // <ACE_OS::gethrtime>. Except on platforms that require that the + // <global_scale_factor_> be set, such as ACE_WIN32, uses the + // low-resolution clock if the <global_scale_factor_> has not been // set. ACE_hrtime_t start_; diff --git a/ace/IOStream.h b/ace/IOStream.h index 06b992c046e..6bdd07b72a7 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -212,7 +212,7 @@ protected: // overflow. void reset_base (void); - // Resets the base() pointer and streambuf mode. This is used + // Resets the <base> pointer and streambuf mode. This is used // internally when get/put buffers are allocatd. protected: @@ -249,11 +249,11 @@ protected: int syncin (void); // syncin is called when the input needs to be synced with the - // source file. In a filebuf, this results in the seek() system + // source file. In a filebuf, this results in the <seek> system // call being used. We can't do that on socket-like connections, so // this does basically nothing. That's safe because we have a // separate read buffer to maintain the already-read data. In a - // filebuf, the single common buffer is used forcing the seek() + // filebuf, the single common buffer is used forcing the <seek> // call. int syncout (void); @@ -304,7 +304,7 @@ protected: } char *ebuf (void) const { - return cur_mode_ == 0 ? 0 : base() + streambuf_size_; + return cur_mode_ == 0 ? 0 : base () + streambuf_size_; } int blen (void) const @@ -341,7 +341,7 @@ typedef ostream& (*__omanip_)(ostream&); // This macro defines the get operator for class MT into datatype DT. // We will use it below to quickly override most (all?) iostream get -// operators. Notice how the ipfx() and isfx() functions are used. +// operators. Notice how the <ipfx> and <isfx> functions are used. #define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v) #if defined (__KCC) @@ -368,7 +368,7 @@ typedef ostream& (*__omanip_)(ostream&); // This macro defines the put operator for class MT into datatype DT. // We will use it below to quickly override most (all?) iostream put -// operators. Notice how the opfx() and osfx() functions are used. +// operators. Notice how the <opfx> and <osfx> functions are used. #define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v) #if defined (__KCC) @@ -480,8 +480,8 @@ typedef ostream& (*__omanip_)(ostream&); PUT_FUNC_SET0(MT,CODE,CODE2) #endif /* ACE_LACKS_SIGNED_CHAR */ -#define GET_MANIP_CODE { if( ipfx() ) { (*func)(*this); } isfx(); return *this; } -#define PUT_MANIP_CODE { if( opfx() ) { (*func)(*this); } osfx(); return *this; } +#define GET_MANIP_CODE { if (ipfx ()) { (*func) (*this); } isfx (); return *this; } +#define PUT_MANIP_CODE { if (opfx ()) { (*func) (*this); } osfx (); return *this; } #define GET_FUNC_SET(MT) GET_FUNC_SET1(MT,GET_CODE,GET_MANIP_CODE) #define PUT_FUNC_SET(MT) PUT_FUNC_SET1(MT,PUT_CODE,PUT_MANIP_CODE) diff --git a/ace/IOStream_T.h b/ace/IOStream_T.h index 86e0c6bf645..289fe568a60 100644 --- a/ace/IOStream_T.h +++ b/ace/IOStream_T.h @@ -125,9 +125,9 @@ public: int eof (void) const; // Returns 1 if we're at the end of the <STREAM>, i.e., if the // connection has closed down or an error has occurred, else 0. - // Under the covers, eof() calls the streambuf's timeout() function + // Under the covers, <eof> calls the streambuf's <timeout> function // which will reset the timeout flag. As as result, you should save - // the return of eof() and check it instead of calling eof() + // the return of <eof> and check it instead of calling <eof> // successively. #if defined (ACE_HAS_STRING_CLASS) @@ -146,61 +146,63 @@ public: #if defined (ACE_LACKS_IOSTREAM_FX) virtual int ipfx (int noskip = 0) { - if (good()) + if (good ()) { - if (tie() != 0) - tie()->flush(); - if (!noskip && flags() & skipws) + if (tie () != 0) + tie ()->flush (); + if (!noskip && flags () & skipws) { int ch; - while (isspace(ch = rdbuf()->sbumpc())) - ; + while (isspace (ch = rdbuf ()->sbumpc ())) + continue; if (ch != EOF) - rdbuf()->sputbackc(ch); + rdbuf ()->sputbackc (ch); } - if (good()) - return (1); + if (good ()) + return 1; } -#if !defined (ACE_WIN32) /* MS VC++ 5.0 doesn't declare setstate */ - setstate(failbit); +#if !defined (ACE_WIN32) + // MS VC++ 5.0 doesn't declare setstate. + setstate (failbit); #endif /* !ACE_WIN32 */ return (0); } - virtual int ipfx0(void) { return ipfx (0); } // Optimized ipfx(0) - virtual int ipfx1(void) // Optimized ipfx(1) + virtual int ipfx0 (void) { return ipfx (0); } // Optimized ipfx(0) + virtual int ipfx1 (void) // Optimized ipfx(1) { - if (good()) + if (good ()) { - if (tie() != 0) - tie()->flush(); - if (good()) - return (1); + if (tie () != 0) + tie ()->flush (); + if (good ()) + return 1; } -#if !defined (ACE_WIN32) /* MS VC++ 5.0 doesn't declare setstate */ - setstate(failbit); +#if !defined (ACE_WIN32) + // MS VC++ 5.0 doesn't declare setstate. + setstate (failbit); #endif /* !ACE_WIN32 */ return (0); } - virtual void isfx (void) { return; } + virtual void isfx (void) { return; } virtual int opfx (void) { - if (good() && tie() != 0) - tie()->flush(); - return (good()); + if (good () && tie () != 0) + tie ()->flush (); + return good (); } - virtual void osfx (void) { if (flags() & unitbuf) flush(); } + virtual void osfx (void) { if (flags () & unitbuf) flush (); } #else #if defined (__GNUC__) - virtual int ipfx0(void) { return iostream::ipfx0 (); } // Optimized ipfx(0) - virtual int ipfx1(void) { return iostream::ipfx1(); } // Optimized ipfx(1) + virtual int ipfx0 (void) { return iostream::ipfx0 (); } // Optimized ipfx(0) + virtual int ipfx1 (void) { return iostream::ipfx1 (); } // Optimized ipfx(1) #else - virtual int ipfx0(void) { return iostream::ipfx (0); } - virtual int ipfx1(void) { return iostream::ipfx (1); } + virtual int ipfx0 (void) { return iostream::ipfx (0); } + virtual int ipfx1 (void) { return iostream::ipfx (1); } #endif /* __GNUC__ */ virtual int ipfx (int need = 0) { return iostream::ipfx (need); } - virtual void isfx (void) { iostream::isfx (); return; } + virtual void isfx (void) { iostream::isfx (); } virtual int opfx (void) { return iostream::opfx (); } - virtual void osfx (void) { iostream::osfx (); return; } + virtual void osfx (void) { iostream::osfx (); } #endif /* ACE_LACKS_IOSTREAM_FX */ ACE_IOStream<STREAM> & operator>> (ACE_Time_Value *&tv); diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h index e797f5b7ee9..1e777ddafdc 100644 --- a/ace/Local_Tokens.h +++ b/ace/Local_Tokens.h @@ -467,11 +467,11 @@ public: virtual int acquire (ACE_TPQ_Entry *caller, int ignore_deadlock, int notify); - // Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as + // Returns 0 on success, -1 on failure with <ACE_Log_Msg::errnum> as // the reason. If errnum == EWOULDBLOCK, and notify == 1, - // ACE_Token_Proxy::sleep_hook() has been called on the current owner - // of the token. If ignore_deadlock is passed as 1 and errnum == - // EDEADLK, then deadlock was detected via ace_token_manager. + // <ACE_Token_Proxy::sleep_hook> has been called on the current + // owner of the token. If ignore_deadlock is passed as 1 and errnum + // == EDEADLK, then deadlock was detected via ace_token_manager. virtual int tryacquire (ACE_TPQ_Entry *caller); // same as acquire, but fails if would block @@ -491,11 +491,11 @@ public: // waiting threads it will give up the token even if the // nesting_level_ > 1. I'm not sure if this is really the right // thing to do (since it makes it possible for shared data to be - // changed unexpectedly) so use with caution... - // Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as - // the reason. If errnum == EWOULDBLOCK, and notify == 1, - // ACE_Token_Proxy::sleep_hook() has been called on the current owner - // of the token. + // changed unexpectedly) so use with caution... Returns 0 on + // success, -1 on failure with <ACE_Log_Msg::errnum> as the reason. + // If errnum == EWOULDBLOCK, and notify == 1, + // <ACE_Token_Proxy::sleep_hook> has been called on the current + // owner of the token. virtual int release (ACE_TPQ_Entry *caller); // Relinquish the token. If there are any waiters then the next one @@ -555,11 +555,11 @@ public: virtual int acquire (ACE_TPQ_Entry *caller, int ignore_deadlock, int notify); - // Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as + // Returns 0 on success, -1 on failure with <ACE_Log_Msg::errnum> as // the reason. If errnum == EWOULDBLOCK, and notify == 1, - // ACE_Token_Proxy::sleep_hook() has been called on the current owner - // of the token. If ignore_deadlock is passed as 1 and errnum == - // EDEADLK, then deadlock was detected via ace_token_manager. + // <ACE_Token_Proxy::sleep_hook> has been called on the current + // owner of the token. If ignore_deadlock is passed as 1 and errnum + // == EDEADLK, then deadlock was detected via ace_token_manager. virtual int tryacquire (ACE_TPQ_Entry *caller); // same as acquire except fails on would block @@ -579,11 +579,11 @@ public: // waiting threads it will give up the token even if the // nesting_level_ > 1. I'm not sure if this is really the right // thing to do (since it makes it possible for shared data to be - // changed unexpectedly) so use with caution... - // Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as - // the reason. If errnum == EWOULDBLOCK, and notify == 1, - // ACE_Token_Proxy::sleep_hook() has been called on the current owner - // of the token. + // changed unexpectedly) so use with caution... Returns 0 on + // success, -1 on failure with <ACE_Log_Msg::errnum> as the reason. + // If errnum == EWOULDBLOCK, and notify == 1, + // <ACE_Token_Proxy::sleep_hook> has been called on the current + // owner of the token. virtual int release (ACE_TPQ_Entry *caller); // Relinquish the token. If there are any waiters then the next one @@ -683,7 +683,7 @@ class ACE_Export ACE_Token_Proxy // changed. See ACE_Token_Manager for details. // // Tokens (e.g. ACE_Mutex_Token) assume that it can always call - // ACE_Token_Proxy::token_acquired () on a new token owner. This + // <ACE_Token_Proxy::token_acquired> on a new token owner. This // is not a problem for synchronous use of token proxies (that is, // when acquires block until successful.) However, for // implementations of the Token Server, which may use asynch @@ -781,9 +781,9 @@ public: // called "Reactor Token." virtual void sleep_hook (void); - // This should really be called someone_waiting (). - // This is called by ACE_Token_xx's when another proxy enters the - // waiting list and requests that the current token holder be notified. + // This should really be called <someone_waiting>. This is called + // by ACE_Token_xx's when another proxy enters the waiting list and + // requests that the current token holder be notified. virtual void token_acquired (ACE_TPQ_Entry *); // This is called when a queued (waiting) proxy is removed from the diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h index b74b2afaf2c..a6506eeab33 100644 --- a/ace/Log_Msg.h +++ b/ace/Log_Msg.h @@ -113,16 +113,16 @@ class ACE_Export ACE_Log_Msg_Callback // Log_Msg class and make sure that they turn on the // ACE_Log_Msg::MSG_CALLBACK flag. // - // Your log() routine is called with an instance of + // Your <log> routine is called with an instance of // ACE_Log_Record. From this class, you can get the log // message, the verbose log message, message type, message // priority, and so on. // // Remember that there is one Log_Msg object per thread. // Therefore, you may need to register your callback object with - // many Log_Msg objects (and have the correct synchronization in - // the log() method) or have a separate callback object per - // Log_Msg object. + // many <ACE_Log_Msg> objects (and have the correct + // synchronization in the <log> method) or have a separate + // callback object per Log_Msg object. public: virtual ~ACE_Log_Msg_Callback (void); // No-op virtual destructor. diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp index 6989ce2a4f6..d06ba145f31 100644 --- a/ace/Malloc.cpp +++ b/ace/Malloc.cpp @@ -41,13 +41,19 @@ ACE_Name_Node::ACE_Name_Node (void) } ACE_Name_Node::ACE_Name_Node (const char *name, - char *ptr, + char *name_ptr, + char *pointer, ACE_Name_Node *next) - : pointer_ (ptr), + : name_ (name_ptr), + pointer_ (pointer), next_ (next) { ACE_TRACE ("ACE_Name_Node::ACE_Name_Node"); - ACE_OS::strcpy (ACE_POINTER_CAST (this->name_), name); + char *n = ACE_POINTER_CAST (this->name_); + ACE_DEBUG ((LM_DEBUG, + "****** this->name_ = %x\n", n)); + ACE_OS::strcpy (n, name); + this->dump (); } ACE_Name_Node::ACE_Name_Node (const ACE_Name_Node &) @@ -59,6 +65,7 @@ ACE_Name_Node::ACE_Name_Node (const ACE_Name_Node &) const char * ACE_Name_Node::name (void) const { + this->dump (); return ACE_POINTER_CAST (this->name_); } @@ -76,7 +83,7 @@ ACE_Name_Node::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("pointer = %x"), ACE_POINTER_CAST (this->pointer_))); ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nnext_ = %x"), ACE_POINTER_CAST (this->next_))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nname_ = %s"), ACE_POINTER_CAST (this->name_))); + ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nname_ = (%x, %s)"), ACE_POINTER_CAST (this->name_), ACE_POINTER_CAST (this->name_))); ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n"))); ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); } diff --git a/ace/Malloc.h b/ace/Malloc.h index 7844a8079a3..e1a6c6408c6 100644 --- a/ace/Malloc.h +++ b/ace/Malloc.h @@ -121,8 +121,9 @@ class ACE_Export ACE_Name_Node public: // = Initialization methods. ACE_Name_Node (const char *name, - char *, - ACE_Name_Node *); + char *name_ptr, + char *pointer, + ACE_Name_Node *head); // Constructor. ACE_Name_Node (const ACE_Name_Node &); @@ -200,7 +201,7 @@ public: + MAXNAMELEN)) #endif /* ACE_HAS_MALLOC_STATS */ -// Notice the casting to int for sizeof() otherwise unsigned int +// Notice the casting to int for <sizeof> otherwise unsigned int // arithmetic is used and some awful things may happen. #define ACE_CONTROL_BLOCK_ALIGN_LONGS ((ACE_CONTROL_BLOCK_SIZE % ACE_MALLOC_PADDING != 0 \ ? ACE_MALLOC_PADDING - (ACE_CONTROL_BLOCK_SIZE) \ @@ -210,7 +211,7 @@ public: // Force alignment. ACE_Malloc_Header base_; - // Dummy node used to anchor the freelist. + // Dummy node used to anchor the freelist. This needs to come last... void dump (void) const; // Dump the state of the object. @@ -251,8 +252,8 @@ public: virtual void dump (void) const; private: - // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! - // See the ACE_Allocator::instance () implementation for explanation. + // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! See the + // <ACE_Allocator::instance> implementation for explanation. }; class ACE_Export ACE_Static_Allocator_Base : public ACE_Allocator diff --git a/ace/Malloc_Base.h b/ace/Malloc_Base.h index f2a40868cd2..2d4f95c2a89 100644 --- a/ace/Malloc_Base.h +++ b/ace/Malloc_Base.h @@ -121,8 +121,8 @@ public: virtual void dump (void) const = 0; // Dump the state of the object. private: - // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! - // See the ACE_Allocator::instance () implementation for explanation. + // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! See the + // <ACE_Allocator::instance> implementation for explanation. static ACE_Allocator *allocator_; // Pointer to a process-wide <ACE_Allocator> instance. diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 8d3ba28d10f..3f760050910 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -479,19 +479,17 @@ ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::shared_bind (const char *name, (ACE_Name_Node *) this->shared_malloc (sizeof (ACE_Name_Node) + ACE_OS::strlen (name) + 1), -1); - - // This is a clever trick that skips over the <ACE_Name_Node> chunk - // and points to where the string name goes. - new_node->name_ = (char *) (new_node + 1); - - // Insert new node at the head of the list. Note that (new_node) is - // *not* a cast, it's operator placement new. - ACE_NEW_RETURN (this->cb_ptr_->name_head_, - (new_node) ACE_Name_Node (name, - ACE_reinterpret_cast (char *, - pointer), - ACE_POINTER_CAST (this->cb_ptr_->name_head_)), - -1); + char *name_ptr = (char *) (new_node + 1); + + // Use operator placement new to insert <new_node> at the head of + // the linked list of <ACE_Name_Node>s. + ACE_Name_Node *result = + new (new_node) ACE_Name_Node (name, + name_ptr, + ACE_reinterpret_cast (char *, + pointer), + ACE_POINTER_CAST (this->cb_ptr_->name_head_)); + this->cb_ptr_->name_head_ = result; return 0; } diff --git a/ace/Managed_Object.h b/ace/Managed_Object.h index 01556585db4..b14ca2cf820 100644 --- a/ace/Managed_Object.h +++ b/ace/Managed_Object.h @@ -75,7 +75,7 @@ class ACE_Managed_Object // until needed, but should be allocated when first needed. And // they are destroyed in the reverse order of construction. // - // get_preallocated_object () accesses a "preallocated" object, + // <get_preallocated_object> accesses a "preallocated" object, // i.e., one that is identified by a value in the // ACE_Object_Manager:: Preallocated_Object enum. These objects // are used internally by the ACE library. @@ -136,7 +136,7 @@ public: private: // Disallow instantiation of this class. - ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object ()) + ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (void)) ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (const ACE_Managed_Object<TYPE> &)) ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Managed_Object<TYPE> &)) diff --git a/ace/Map_T.h b/ace/Map_T.h index 2b9e2594a72..88b35feef50 100644 --- a/ace/Map_T.h +++ b/ace/Map_T.h @@ -34,7 +34,7 @@ class ACE_Noop_Key_Generator // Defines a noop key generator. public: - int operator() (T &); + int operator () (T &); // Functor method: generates a new key. }; @@ -59,7 +59,7 @@ public: ACE_Incremental_Key_Generator (void); // Constructor. - int operator() (T &t); + int operator () (T &t); // Functor method: generates a new key. T& current_value (void); @@ -90,7 +90,7 @@ public: virtual int compare (const ACE_Iterator_Impl<T> &rhs) const = 0; // Comparison. - virtual T dereference () const = 0; + virtual T dereference (void) const = 0; // Dereference. virtual void plus_plus (void) = 0; @@ -119,7 +119,7 @@ public: virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const = 0; // Comparison. - virtual T dereference () const = 0; + virtual T dereference (void) const = 0; // Dereference. virtual void plus_plus (void) = 0; @@ -159,7 +159,7 @@ public: int operator!= (const ACE_Iterator<T> &rhs) const; // Comparison operators. - T operator* () const; + T operator *() const; // Dereference operator. ACE_Iterator<T> &operator++ (void); @@ -213,7 +213,7 @@ public: int operator!= (const ACE_Reverse_Iterator<T> &rhs) const; // Comparison operators. - T operator* () const; + T operator *() const; // Dereference operator. ACE_Reverse_Iterator<T> &operator++ (void); @@ -427,7 +427,7 @@ public: virtual int compare (const ACE_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -471,7 +471,7 @@ public: virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -676,7 +676,7 @@ public: virtual int compare (const ACE_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -720,7 +720,7 @@ public: virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -940,7 +940,7 @@ public: virtual int compare (const ACE_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -984,7 +984,7 @@ public: virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -1194,7 +1194,7 @@ public: virtual int compare (const ACE_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); @@ -1238,7 +1238,7 @@ public: virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const; // Comparison. - virtual T dereference () const; + virtual T dereference (void) const; // Dereference. virtual void plus_plus (void); diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h index 78fdd72a966..83523ec9aab 100644 --- a/ace/Memory_Pool.h +++ b/ace/Memory_Pool.h @@ -193,7 +193,7 @@ protected: virtual int commit_backing_store_name (size_t rounded_bytes, off_t &offset); // Commits a new shared memory segment if necessary after an - // acquire() or a signal. <offset> is set to the new offset into + // <acquire> or a signal. <offset> is set to the new offset into // the backing store. // = Keeps track of all the segments being used. @@ -487,7 +487,7 @@ class ACE_Export ACE_Lite_MMAP_Memory_Pool : public ACE_MMAP_Memory_Pool // = DESCRIPTION // This implementation allows memory to be shared between // processes. However, unlike the <ACE_MMAP_Memory_Pool> - // the sync() methods are no-ops, which means that we don't pay + // the <sync> methods are no-ops, which means that we don't pay // for the price of flushing the memory to the backing store on // every update. Naturally, this trades off increased // performance for less reliability if the machine crashes. diff --git a/ace/Message_Block.h b/ace/Message_Block.h index 802787ed1e6..4bd906b9e46 100644 --- a/ace/Message_Block.h +++ b/ace/Message_Block.h @@ -182,8 +182,8 @@ public: virtual ~ACE_Message_Block (void); // Delete all the resources held in the message. // - // Note that release() is designed to release the continuation - // chain; the destructor is not. See release() for details. + // Note that <release> is designed to release the continuation + // chain; the destructor is not. See <release> for details. // = Message Type accessors and mutators. @@ -251,9 +251,9 @@ public: // In all cases, this ACE_Message_Block is deleted - it must have come // from the heap, or there will be trouble. // - // release() is designed to release the continuation chain; the + // <release> is designed to release the continuation chain; the // destructor is not. If we make the destructor release the - // continuation chain by calling release() or delete on the message + // continuation chain by calling <release> or delete on the message // blocks in the continuation chain, the following code will not // work since the message block in the continuation chain is not off // the heap: @@ -263,7 +263,7 @@ public: // // mb1.cont (&mb2); // - // And hence, call release() on a dynamically allocated message + // And hence, call <release> on a dynamically allocated message // block. This will release all the message blocks in the // continuation chain. If you call delete or let the message block // fall off the stack, cleanup of the message blocks in the @@ -285,7 +285,7 @@ public: // <wr_ptr>. int copy (const char *buf); - // Copies <buf> into the Message_Block starting at the wr_ptr() + // Copies <buf> into the Message_Block starting at the <wr_ptr> // offset. This call assumees that <buf> is NUL-terminated. Return // 0 and increment <wr_ptr> by <ACE_OS::strlen (buf) + 1> if the // method succeeds. Returns -1 if the size of the message is too @@ -317,7 +317,7 @@ public: // Set the write pointer ahead <n> bytes. This is used to compute // the <length> of a message. - // = Message length is wr_ptr() - rd_ptr (). + // = Message length is <wr_ptr> - <rd_ptr>. size_t length (void) const; // Get the length of the message void length (size_t n); @@ -658,11 +658,11 @@ public: u_long dynamic_priority_offset); // ctor - virtual ~ACE_Dynamic_Message_Strategy (); + virtual ~ACE_Dynamic_Message_Strategy (void); // virtual dtor - Priority_Status priority_status (ACE_Message_Block & mb, - const ACE_Time_Value & tv); + Priority_Status priority_status (ACE_Message_Block &mb, + const ACE_Time_Value &tv); // Updates the message's priority and returns its priority status. u_long static_bit_field_mask (void); diff --git a/ace/Message_Queue.h b/ace/Message_Queue.h index b251e62cd0d..2b1a8f78243 100644 --- a/ace/Message_Queue.h +++ b/ace/Message_Queue.h @@ -48,9 +48,9 @@ public: DEFAULT_LWM = 16 * 1024, // Default low watermark (same as high water mark). WAS_ACTIVE = 1, - // Message queue was active before activate() or deactivate(). + // Message queue was active before <activate> or <deactivate>. WAS_INACTIVE = 2 - // Message queue was inactive before activate() or deactivate(). + // Message queue was inactive before <activate> or <deactivate>. }; ACE_Message_Queue_Base (void); @@ -233,7 +233,10 @@ protected: virtual int is_empty_i (void); // True if queue is empty, else false. - // = Implementation of the public activate() and deactivate() methods above (assumes locks are held). + // = Implementation of public <activate>/<deactivate> methods above. + + // These methods assume locks are held. + virtual int deactivate_i (void); // Deactivate the queue. virtual int activate_i (void); @@ -289,12 +292,12 @@ class ACE_Export ACE_Message_Queue_NT : public ACE_Message_Queue_Base // // NOTE: *Many* ACE_Message_Queue features are not supported with // this implementation, including: - // * open method have different signatures. - // * dequeue_head () *requires* that the ACE_Message_Block - // pointer argument point to an ACE_Message_Block that was + // * <open> method have different signatures. + // * <dequeue_head> *requires* that the <ACE_Message_Block> + // pointer argument point to an <ACE_Message_Block> that was // allocated by the caller. - // * peek_dequeue_head (). - // * ACE_Message_Queue_Iterators. + // * <peek_dequeue_head>. + // * <ACE_Message_Queue_Iterators>. // * No flow control. public: // = Initialization and termination methods. diff --git a/ace/Module.h b/ace/Module.h index c32d41ef5f4..45463b93a05 100644 --- a/ace/Module.h +++ b/ace/Module.h @@ -38,16 +38,16 @@ public: enum { M_DELETE_NONE = 0, - // Indicates that close() should not delete any Tasks. + // Indicates that <close> should not delete any Tasks. M_DELETE_READER = 1, - // Indicates that close() should delete the writer Task. + // Indicates that <close> should delete the writer Task. M_DELETE_WRITER = 2, - // Indicates that close() should delete the reader Task. + // Indicates that <close> should delete the reader Task. M_DELETE = 3 - // Indicates that close() deletes the Tasks. Don't change this + // Indicates that <close> deletes the Tasks. Don't change this // value without updating the same enum in class ACE_Stream... // The <M_DELETE_READER> and <M_DELETE_WRITER> flags may be or'ed // together. @@ -93,14 +93,14 @@ public: // and <reader> and <writer> as its tasks. Previously register // reader or writers or closed down and deleted according to the // value of flags_. Should not be called from within - // ACE_Task::module_closed(). + // <ACE_Task::module_closed>. int close (int flags = M_DELETE_NONE); // Close down the Module and its Tasks. The flags argument can be // used to override the default behaviour, which depends on previous - // <flags> values in calls to c'tor(), open(), reader() and - // writer(). A previous value M_DELETE[_XXX] can not be overridden. - // Should not be called from within ACE_Task::module_closed(). + // <flags> values in calls to c'tor, <open>, <reader>, and <writer>. + // A previous value M_DELETE[_XXX] can not be overridden. Should + // not be called from within <ACE_Task::module_closed>. // = ACE_Task manipulation routines ACE_Task<ACE_SYNCH_USE> *writer (void); @@ -111,7 +111,7 @@ public: // module should delete the writer during a call to close or to the // destructor. If a previous writer exists, it is closed. It may // also be deleted, depending on the old flags_ value. Should not - // be called from within ACE_Task::module_closed(). + // be called from within <ACE_Task::module_closed>. ACE_Task<ACE_SYNCH_USE> *reader (void); // Get the reader task. @@ -121,7 +121,7 @@ public: // module should delete the reader during a call to close or to the // destructor. If a previous reader exists, it is closed. It may // also be deleted, depending on the old flags_ value. Should not - // be called from within ACE_Task::module_closed() + // be called from within <ACE_Task::module_closed>. ACE_Task<ACE_SYNCH_USE> *sibling (ACE_Task<ACE_SYNCH_USE> *orig); // Set and get pointer to sibling <ACE_Task> in an <ACE_Module> diff --git a/ace/NT_Service.h b/ace/NT_Service.h index c266454568e..ed43e3668d8 100644 --- a/ace/NT_Service.h +++ b/ace/NT_Service.h @@ -110,8 +110,9 @@ public: // = Functions to operate the service virtual int open (void *args = 0); - // Hook called to open the service. By default, will set the status to - // START_PENDING, svc(), wait(), then set the status to STOPPED. + // Hook called to open the service. By default, will set the status + // to <START>_PENDING, <svc>, <wait>, then set the status to + // STOPPED. virtual int svc (void); // The actual service implementation. This function need not be overridden @@ -121,12 +122,12 @@ public: virtual void handle_control (DWORD control_code); // This function is called in response to a request from the Service - // Dispatcher. It must interact with the svc() function to effect the + // Dispatcher. It must interact with the <svc> function to effect the // requested control operation. The default implementation handles // all requests as follows: // SERVICE_CONTROL_STOP: set stop pending, set cancel flag - // SERVICE_CONTROL_PAUSE: set pause pending, suspend(), set paused - // SERVICE_CONTROL_CONTINUE: set continue pending, resume(), set running + // SERVICE_CONTROL_PAUSE: set pause pending, <suspend>, set paused + // SERVICE_CONTROL_CONTINUE: set continue pending, <resume>, set running // SERVICE_CONTROL_INTERROGATE: reports current status // SERVICE_CONTROL_SHUTDOWN: same as SERVICE_CONTROL_STOP. @@ -238,7 +239,7 @@ public: // service state values are all greater than 0. int state (DWORD *pstate, ACE_Time_Value *wait_hint = 0); - // A version of state() which returns -1 for failure, 0 for success. + // A version of <state> that returns -1 for failure, 0 for success. // The DWORD pointed to by pstate receives the state value. int test_access (DWORD desired_access = SERVICE_ALL_ACCESS); @@ -271,16 +272,16 @@ protected: // wait after that. virtual void stop_requested (DWORD control_code); - // Called by handle_control () when a stop/shutdown was requested. + // Called by <handle_control> when a stop/shutdown was requested. virtual void pause_requested (DWORD control_code); - // Called by handle_control () when a pause was requested. + // Called by <handle_control> when a pause was requested. virtual void continue_requested (DWORD control_code); - // Called by handle_control () when a continue was requested. + // Called by <handle_control> when a continue was requested. virtual void interrogate_requested (DWORD control_code); - // Called by handle_control () when a interrogate was requested. + // Called by <handle_control> when a interrogate was requested. protected: DWORD start_time_; // Estimate of init time needed diff --git a/ace/Naming_Context.h b/ace/Naming_Context.h index 1067635cb82..4484c10c1f0 100644 --- a/ace/Naming_Context.h +++ b/ace/Naming_Context.h @@ -221,7 +221,7 @@ public: // means the types must begin with the pattern string. Returns the // complete binding associated each pattern match. - void dump (); + void dump (void); // Dump the state of the object. private: @@ -26,6 +26,12 @@ # pragma once # endif /* ACE_LACKS_PRAGMA_ONCE */ +# if defined (ACE_HAS_PHARLAP_RT) +#define ACE_IPPROTO_TCP SOL_SOCKET +# else +#define ACE_IPPROTO_TCP IPPROTO_TCP; +# endif /* ACE_HAS_PHARLAP_RT */ + #if !defined (ACE_MALLOC_ALIGN) #define ACE_MALLOC_ALIGN ((int) sizeof (long)) #endif /* ACE_MALLOC_ALIGN */ @@ -316,7 +322,7 @@ enum ACE_Recyclable_State # define ACE_DEFAULT_THR_PORT 10004 # endif /* ACE_DEFAULT_THR_PORT */ -// Used for SOCK_Connect::connect() tests +// Used for <SOCK_Connect::connect> tests # if !defined (ACE_DEFAULT_LOCAL_PORT) # define ACE_DEFAULT_LOCAL_PORT 10005 # endif /* ACE_DEFAULT_LOCAL_PORT */ diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index 46c55d46a9a..f9b6db943d9 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -153,35 +153,35 @@ class ACE_Export ACE_Object_Manager : public ACE_Object_Manager_Base // late. The ACE tests do not violate this requirement. // However, applications may have trouble with it. // - // NOTE on the use of ::exit (): ::exit () does not destroy + // NOTE on the use of <::exit> -- <::exit> does not destroy // static objects. Therefore, if // ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled, the - // ACE_Object_Manager instance will *not* be destroyed if ::exit - // () is called! However, ACE_OS::exit () will properly destroy - // the ACE_Object_Manager. It is highly recommended that - // ACE_OS::exit () be used instead of ::exit (). + // <ACE_Object_Manager> instance will *not* be destroyed if + // <::exit> is called! However, <ACE_OS::exit> will properly + // destroy the ACE_Object_Manager. It is highly recommended + // that <ACE_OS::exit> be used instead of <::exit>. // - // However, ::exit () and ACE_OS::exit () are tricky to use + // However, <::exit> and <ACE_OS::exit> are tricky to use // properly, especially in multithread programs. It is much // safer to throw an exception (or simulate that effect) that - // will be caught by main () instead of calling exit. Then, - // main () can perform any necessary application-specific - // cleanup and return the status value. In addition, it's - // usually best to avoid calling ::exit () and ACE_OS::exit () - // from threads other than the main thread. Thanks to Jeff - // Greif <jmg@trivida.com> for pointing out that ::exit () - // doesn't destroy automatic objects, and for developing the + // will be caught by <main> instead of calling exit. Then, + // <main> can perform any necessary application-specific cleanup + // and return the status value. In addition, it's usually best + // to avoid calling <::exit> and <ACE_OS::exit> from threads + // other than the main thread. Thanks to Jeff Greif + // <jmg@trivida.com> for pointing out that <::exit> doesn't + // destroy automatic objects, and for developing the // recommendations in this paragraph. // - // Instead of creating a static ACE_Object_Manager, or letting - // ACE create it on the stack of main () for you, another + // Instead of creating a static <ACE_Object_Manager>, or letting + // ACE create it on the stack of <main> for you, another // alternative is to #define // ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER. With that // #define, the application must create the ACE_Object_Manager. - // The recommended way is to call ACE::init () at the start of - // the program, and call ACE::fini () at the end. - // Alternatively, the application could explicity construct an - // ACE_Object_Manager. + // The recommended way is to call <ACE::init> at the start of + // the program, and call <ACE::fini> at the end. Alternatively, + // the application could explicity construct an + // <ACE_Object_Manager>. public: virtual int init (void); @@ -211,15 +211,14 @@ public: // ACE_HAS_NONSTATIC_OBJECT_MANAGER is not defined.) static int at_exit (ACE_Cleanup *object, void *param = 0); - // Register an ACE_Cleanup object for cleanup at process termination. - // The object is deleted via the ace_cleanup_destroyer (). If you - // need more flexiblity, see the other at_exit () method below. For - // OS's that do not have processes, cleanup takes place at the end of - // main (). Returns 0 on success. On failure, returns -1 and sets - // errno to: - // EAGAIN if shutting down, - // ENOMEM if insufficient virtual memory, or - // EEXIST if the object (or array) had already been registered. + // Register an ACE_Cleanup object for cleanup at process + // termination. The object is deleted via the + // <ace_cleanup_destroyer>. If you need more flexiblity, see the + // <other at_exit> method below. For OS's that do not have + // processes, cleanup takes place at the end of <main>. Returns 0 + // on success. On failure, returns -1 and sets errno to: EAGAIN if + // shutting down, ENOMEM if insufficient virtual memory, or EEXIST + // if the object (or array) had already been registered. static int at_exit (void *object, ACE_CLEANUP_FUNC cleanup_hook, @@ -232,17 +231,16 @@ public: // "cleanup_hook" function; the first parameter is the object (or // array) to be destroyed. "cleanup_hook", for example, may delete // the object (or array). For OS's that do not have processes, this - // function is the same as at_thread_exit (). Returns 0 on success. - // On failure, returns -1 and sets errno to: - // EAGAIN if shutting down, - // ENOMEM if insufficient virtual memory, or - // EEXIST if the object (or array) had already been registered. + // function is the same as <at_thread_exit>. Returns 0 on success. + // On failure, returns -1 and sets errno to: EAGAIN if shutting + // down, ENOMEM if insufficient virtual memory, or EEXIST if the + // object (or array) had already been registered. #if 0 /* not implemented yet */ static int at_thread_exit (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param); - // Similar to at_exit (), except that the cleanup_hook is called + // Similar to <at_exit>, except that the cleanup_hook is called // when the current thread exits instead of when the program terminates. #endif /* 0 */ @@ -361,7 +359,7 @@ public: public: // Application code should not use these explicitly, so they're // hidden here. They're public so that the ACE_Object_Manager can - // be constructed/destructed in main () with + // be constructed/destructed in <main> with // ACE_HAS_NONSTATIC_OBJECT_MANAGER. ACE_Object_Manager (void); ~ACE_Object_Manager (void); diff --git a/ace/Pipe.cpp b/ace/Pipe.cpp index d741da94a98..8291c253765 100644 --- a/ace/Pipe.cpp +++ b/ace/Pipe.cpp @@ -23,7 +23,7 @@ ACE_Pipe::dump (void) const } int -ACE_Pipe::open (void) +ACE_Pipe::open (int buffer_size) { ACE_TRACE ("ACE_Pipe::open"); #if defined (ACE_WIN32) || defined (ACE_LACKS_SOCKETPAIR) @@ -64,20 +64,34 @@ ACE_Pipe::open (void) // Make sure that the TCP stack doesn't try to buffer small writes. // Since this communication is purely local to the host it doesn't // affect network performance. -# if defined (ACE_HAS_PHARLAP_RT) - int level = SOL_SOCKET; -# else - int level = IPPROTO_TCP; -# endif /* ACE_HAS_PHARLAP_RT */ - if (writer.set_option (level, TCP_NODELAY, - &one, sizeof one) == -1) + + if (writer.set_option (ACE_IPPROTO_TCP, + TCP_NODELAY, + &one, + sizeof one) == -1) return -1; #endif /* ! ACE_LACKS_TCP_NODELAY */ +#if !defined (ACE_LACKS_SOCKET_BUFSIZ) + if (reader.set_option (SOL_SOCKET, + SO_SNDBUF, + ACE_reinterpret_cast (void *, &buffer_size), + sizeof (buffer_size)) == -1 + && errno != ENOTSUP) + return -1; + else if (writer.set_option (SOL_SOCKET, + SO_RCVBUF, + ACE_reinterpret_cast (void *, &buffer_size), + sizeof (buffer_size)) == -1 + && errno != ENOTSUP) + return -1; +#endif /* !ACE_LACKS_SOCKET_BUFSIZ */ + this->handles_[0] = reader.get_handle (); this->handles_[1] = writer.get_handle (); #elif defined (ACE_HAS_STREAM_PIPES) + ACE_UNUSED_ARG (buffer_size); if (ACE_OS::pipe (this->handles_) == -1) ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), @@ -87,8 +101,12 @@ ACE_Pipe::open (void) // Enable "msg no discard" mode, which ensures that record // boundaries are maintained when messages are sent and received. - if (ACE_OS::ioctl (this->handles_[0], I_SRDOPT, (void *) arg) == -1 - || ACE_OS::ioctl (this->handles_[1], I_SRDOPT, (void *) arg) == -1) + if (ACE_OS::ioctl (this->handles_[0], + I_SRDOPT, + (void *) arg) == -1 + || ACE_OS::ioctl (this->handles_[1], + I_SRDOPT, + (void *) arg) == -1) ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ioctl")), -1); @@ -101,6 +119,22 @@ ACE_Pipe::open (void) ASYS_TEXT ("%p\n"), ASYS_TEXT ("socketpair")), -1); +#if !defined (ACE_LACKS_SOCKET_BUFSIZ) + if (ACE_OS::setsockopt (this->handles_[0], + SOL_SOCKET, + SO_RCVBUF, + ACE_reinterpret_cast (void *, &buffer_size), + sizeof (buffer_size)) == -1 + && errno != ENOTSUP) + return -1; + if (ACE_OS::setsockopt (this->handles_[1], + SOL_SOCKET, + SO_SNDBUF, + ACE_reinterpret_cast (void *, &buffer_size), + sizeof (buffer_size)) == -1 + && errno != ENOTSUP) + return -1; +#endif /* !ACE_LACKS_SOCKET_BUFSIZ */ #endif /* ACE_WIN32 */ // Point both the read and write HANDLES to the appropriate socket // HANDLEs. diff --git a/ace/Pipe.h b/ace/Pipe.h index 8fa5cd5ce47..6f2604391ff 100644 --- a/ace/Pipe.h +++ b/ace/Pipe.h @@ -49,8 +49,8 @@ public: int open (ACE_HANDLE handles[2]); // Open the pipe and initialize the handles. - int open (void); - // Open the pipe. + int open (int buffer_size = ACE_DEFAULT_MAX_SOCKET_BUFSIZ); + // Open the pipe, setting the buffer size to the maximum. int close (void); // Close down the pipe HANDLEs; @@ -76,6 +76,6 @@ private: #if !defined (ACE_LACKS_INLINE_FUNCTIONS) #include "ace/Pipe.i" -#endif +#endif /* ACE_LACKS_INLINE_FUNCTIONS */ #endif /* ACE_PIPE_H */ diff --git a/ace/RB_Tree.h b/ace/RB_Tree.h index f75160d9a01..3b505fd34ac 100644 --- a/ace/RB_Tree.h +++ b/ace/RB_Tree.h @@ -617,7 +617,7 @@ public: int is_done (void); // Returns 0 if the iterator is positioned over a valid ACE_RB_Tree // node, returns 1 if not. - // DEPRECATED: use the base class done () method instead. + // DEPRECATED: use the base class <done> method instead. }; diff --git a/ace/Reactor.h b/ace/Reactor.h index bbb2fa635f4..ac70c9c01ee 100644 --- a/ace/Reactor.h +++ b/ace/Reactor.h @@ -309,7 +309,7 @@ public: virtual int suspend_handler (ACE_Event_Handler *event_handler); // Suspend <event_handler> temporarily. Use - // <event_handler->get_handle()> to get the handle. + // <ACE_Event_Handler::get_handle> to get the handle. virtual int suspend_handler (ACE_HANDLE handle); // Suspend <handle> temporarily. @@ -321,8 +321,8 @@ public: // Suspend all <handles> temporarily. virtual int resume_handler (ACE_Event_Handler *event_handler); - // Resume <event_handler>. Use <event_handler->get_handle()> to get - // the handle. + // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to + // get the handle. virtual int resume_handler (ACE_HANDLE handle); // Resume <handle>. diff --git a/ace/Reactor_Impl.h b/ace/Reactor_Impl.h index 7eb92659812..a28eed5641a 100644 --- a/ace/Reactor_Impl.h +++ b/ace/Reactor_Impl.h @@ -261,7 +261,7 @@ public: virtual int suspend_handler (ACE_Event_Handler *event_handler) = 0; // Suspend <event_handler> temporarily. Use - // <event_handler->get_handle()> to get the handle. + // <ACE_Event_Handler::get_handle> to get the handle. virtual int suspend_handler (ACE_HANDLE handle) = 0; // Suspend <handle> temporarily. @@ -273,8 +273,8 @@ public: // Suspend all <handles> temporarily. virtual int resume_handler (ACE_Event_Handler *event_handler) = 0; - // Resume <event_handler>. Use <event_handler->get_handle()> to get - // the handle. + // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to + // get the handle. virtual int resume_handler (ACE_HANDLE handle) = 0; // Resume <handle>. diff --git a/ace/Registry.h b/ace/Registry.h index 1172290300a..5fa265720cd 100644 --- a/ace/Registry.h +++ b/ace/Registry.h @@ -37,8 +37,8 @@ class ACE_Export ACE_Registry // = DESCRIPTION // The registry interface is inspired by the interface // specified in the CORBA Naming Service Specification. - // The implementation is done through Win32 Reg*() functions. - // Other than providing an OO wrapper for the Win32 Reg*() + // The implementation is done through Win32 <Reg*> functions. + // Other than providing an OO wrapper for the Win32 <Reg*> // functions, ACE_Registry provides an abstraction for iteration // over the elements of the Registry. public: @@ -79,7 +79,7 @@ public: struct ACE_Export Binding { - Binding (); + Binding (void); // Empty (default) constructor Binding (const Name &binding_name, @@ -184,8 +184,7 @@ public: // Constructor: key_ will be set to <key> ~Naming_Context (void); - // Destructor will call this->close() - + // Destructor will call <Naming_Context::close>. // The following interfaces are for objects @@ -306,7 +305,7 @@ public: // Remove naming_context with <name> from <this> context int destroy (void); - // Same as unbind_context() with <this> as naming_context + // Same as <unbind_context> with <this> as naming_context int list (u_long how_many, Binding_List &list, @@ -329,7 +328,7 @@ public: int close (void); // Close the handle of the context - // Note: close() does not call flush() + // Note: <close> does not call <flush> // Accessors @@ -393,7 +392,7 @@ public: friend class Naming_Context; // Friend factory - Binding_Iterator (); + Binding_Iterator (void); // Default constructor int next_one (Binding &binding); @@ -434,7 +433,7 @@ public: Binding_List &list) = 0; // Next <how_many> entries - void reset (); + void reset (void); // Reset state protected: diff --git a/ace/Remote_Tokens.h b/ace/Remote_Tokens.h index 4aa5dab587c..43471a556c7 100644 --- a/ace/Remote_Tokens.h +++ b/ace/Remote_Tokens.h @@ -42,7 +42,7 @@ class ACE_Export ACE_Remote_Token_Proxy : public ACE_Token_Proxy // ACE_Token_Proxy. // // = BUGS - // Distributed sleep_hooks have not been implemented. owner_id () + // Distributed sleep_hooks have not been implemented. <owner_id> // is not implemented. public: ACE_Remote_Token_Proxy (void); @@ -89,14 +89,14 @@ public: // Renew the token by offering to release it if there are any other // waiters, otherwise get the token back immediately. This renew // has the same semantics as ACE_Local_Mutex release. It is - // semantically equivalent to <this->release()> followed by - // <this->acquire()>, but it is faster. options contains the - // timeout value used if renew blocks. As with acquire, the timer - // is maintained at the token server. If there are waiters and - // requeue_position == -1, the caller is queued at the rear of the - // waiter list. Otherwise, requeue_position specifies the number of - // waiters to "let by" before reacquiring the token (effectively, - // the position in the waiter list.) + // semantically equivalent to <release> followed by <acquire>, but + // it is faster. options contains the timeout value used if renew + // blocks. As with acquire, the timer is maintained at the token + // server. If there are waiters and requeue_position == -1, the + // caller is queued at the rear of the waiter list. Otherwise, + // requeue_position specifies the number of waiters to "let by" + // before reacquiring the token (effectively, the position in the + // waiter list.) virtual int release (ACE_Synch_Options &options = ACE_Synch_Options::synch); diff --git a/ace/SPIPE_Connector.h b/ace/SPIPE_Connector.h index 422e272e004..4e5c2d0ff9a 100644 --- a/ace/SPIPE_Connector.h +++ b/ace/SPIPE_Connector.h @@ -53,7 +53,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int connect (ACE_SPIPE_Stream &new_io, @@ -76,7 +76,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int reset_new_handle (ACE_HANDLE handle); diff --git a/ace/SString.h b/ace/SString.h index 63f8a949d3c..f53f904050e 100644 --- a/ace/SString.h +++ b/ace/SString.h @@ -609,7 +609,7 @@ class ACE_Export ACE_Auto_String_Free // // = DESCRIPTION // Keeps a pointer to a string and deallocates it (using - // ACE_OS::free()) on its destructor. + // <ACE_OS::free>) on its destructor. // If you need to delete using "delete[]" the // ACE_Auto_Array_Ptr<char*> is your choice. // The class plays the same role as auto_ptr<> diff --git a/ace/SV_Message_Queue.h b/ace/SV_Message_Queue.h index 807faa7fdf7..6a49abcf4d4 100644 --- a/ace/SV_Message_Queue.h +++ b/ace/SV_Message_Queue.h @@ -84,7 +84,7 @@ public: protected: int internal_id_; - // Returned from the underlying msgget() system call. + // Returned from the underlying <msgget> system call. }; #if !defined (ACE_LACKS_INLINE_FUNCTIONS) diff --git a/ace/SV_Semaphore_Complex.h b/ace/SV_Semaphore_Complex.h index 4f904e56468..a72c96d33bf 100644 --- a/ace/SV_Semaphore_Complex.h +++ b/ace/SV_Semaphore_Complex.h @@ -41,15 +41,15 @@ class ACE_Export ACE_SV_Semaphore_Complex : private ACE_SV_Semaphore_Simple // initialized to a large number, decremented on every create // or open and incremented on every close. This way we can use // the "adjust" feature provided by System V so that any - // process that exit's without calling close() is accounted + // process that exit's without calling <close> is accounted // for. It doesn't help us if the last process does this (as we // have no way of getting control to remove the // ACE_SV_Semaphore) but it will work if any process other than // the last does an exit (intentional or unintentional). // // The second member, [1], of the ACE_SV_Semaphore is used as a - // lock variable to avoid any race conditions in the create() - // and close() functions. + // lock variable to avoid any race conditions in the <create> + // and <close> functions. // // The members beyond [1] are actual ACE_SV_Semaphore values in // the array of SV_Semaphores (which may be sized by the user diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h index 41ee8fe7e1f..ab7db7ef87a 100644 --- a/ace/SV_Semaphore_Simple.h +++ b/ace/SV_Semaphore_Simple.h @@ -74,7 +74,7 @@ public: // call is intended to be called from a server, for example, when it // is being shut down, as we do an IPC_RMID on the ACE_SV_Semaphore, // regardless of whether other processes may be using it or not. - // Most other processes should use close() below. + // Most other processes should use <close> below. // = Semaphore acquire and release methods. int acquire (u_short n = 0, int flags = 0) const; diff --git a/ace/Sched_Params.h b/ace/Sched_Params.h index 6817fd677d7..24ade4a5773 100644 --- a/ace/Sched_Params.h +++ b/ace/Sched_Params.h @@ -32,44 +32,45 @@ class ACE_Export ACE_Sched_Params // Container for scheduling-related parameters. // // = DESCRIPTION - // ACE_Sched_Params are passed via - // ACE_OS::sched_params () to the OS to specify scheduling - // parameters. These parameters include scheduling policy, - // such as FIFO, round-robin, or an implementation-defined - // "OTHER" (to which many systems default); priority; and - // a time-slice quantum for round-robin scheduling. - // A "scope" parameter specifies whether the ACE_Sched_Params + // ACE_Sched_Params are passed via <ACE_OS::sched_params> to the + // OS to specify scheduling parameters. These parameters include + // scheduling policy, such as FIFO (ACE_SCHED_FIFO), round-robin + // (ACE_SCHED_RR), or an implementation-defined "OTHER" + // (ACE_SCHED_OTHER), to which many systems default; priority; + // and a time-slice quantum for round-robin scheduling. A + // "scope" parameter specifies whether the ACE_Sched_Params // applies to the current process, current lightweight process // (LWP) (on Solaris), or current thread. Please see the "NOTE" - // below about not all combinations of parameters being legal - // on a particular platform. + // below about not all combinations of parameters being legal on + // a particular platform. // // For the case of thread priorities, it is intended that - // ACE_OS::sched_params () usually be called from main () before - // any threads have been spawned. - // If spawned threads inherit their parent's priority (I think - // that's the default behavior for all of our platforms), then - // this sets the default base priority. Individual thread priorities - // can be adjusted as usual using ACE_OS::thr_prio () or via the - // ACE_Thread interface. See the parameter descriptions in the - // private: section below. + // <ACE_OS::sched_params> usually be called from <main> before + // any threads have been spawned. If spawned threads inherit + // their parent's priority (I think that's the default behavior + // for all of our platforms), then this sets the default base + // priority. Individual thread priorities can be adjusted as + // usual using <ACE_OS::thr_prio> or via the ACE_Thread + // interface. See the parameter descriptions in the private: + // section below. // - // NOTE: this class does not do any checking of parameters. - // It is just a container class. If it is constructed with values + // NOTE: this class does not do any checking of parameters. It + // is just a container class. If it is constructed with values // that are not supported on a platform, the call to - // ACE_OS::sched_params () will fail by returning -1 with EINVAL - // (available through ACE_OS::last_error ()). + // <ACE_OS::sched_params> will fail by returning -1 with EINVAL + // (available through <ACE_OS::last_error>). - // NOTE: Solaris 2.5.x threads in the RT class must set the + // NOTE: Solaris 2.5.x threads in the RT class must set the // priority of their LWP. The only way to do that through ACE is - // for the RT thread itself to call ACE_OS::thr_setprio () with + // for the RT thread itself to call <ACE_OS::thr_setprio> with // it's own priority. - // OS Scheduling parameters are complicated and often confusing. Many - // thanks to Thilo Kielmann <kielmann@informatik.uni-siegen.de> for his - // careful review of this class design, thoughtful comments, and - // assistance with implementation, especially for PTHREADS platforms. - // Please send any comments or corrections to the ACE developers. + // OS Scheduling parameters are complicated and often confusing. + // Many thanks to Thilo Kielmann + // <kielmann@informatik.uni-siegen.de> for his careful review of + // this class design, thoughtful comments, and assistance with + // implementation, especially for PTHREADS platforms. Please + // send any comments or corrections to the ACE developers. public: typedef int Policy; diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp index e5065b865c6..8f8fd2c4070 100644 --- a/ace/Select_Reactor_Base.cpp +++ b/ace/Select_Reactor_Base.cpp @@ -502,7 +502,8 @@ ACE_Select_Reactor_Notify::open (ACE_Reactor_Impl *r, if (disable_notify_pipe == 0) { - this->select_reactor_ = ACE_dynamic_cast (ACE_Select_Reactor_Impl *, r); + this->select_reactor_ = + ACE_dynamic_cast (ACE_Select_Reactor_Impl *, r); if (select_reactor_ == 0) { diff --git a/ace/Select_Reactor_Base.h b/ace/Select_Reactor_Base.h index 12fd7a80518..01789b46df7 100644 --- a/ace/Select_Reactor_Base.h +++ b/ace/Select_Reactor_Base.h @@ -86,7 +86,7 @@ class ACE_Export ACE_Select_Reactor_Notify : public ACE_Reactor_Notify // = DESCRIPTION // This implementation is necessary for cases where the // <ACE_Select_Reactor> is run in a multi-threaded program. In - // this case, we need to be able to unblock select() or poll() + // this case, we need to be able to unblock <select> or <poll> // when updates occur other than in the main // <ACE_Select_Reactor> thread. To do this, we signal an // auto-reset event the <ACE_Select_Reactor> is listening on. @@ -112,7 +112,7 @@ public: ACE_Time_Value * = 0); // Called by a thread when it wants to unblock the // <ACE_Select_Reactor>. This wakeups the <ACE_Select_Reactor> if - // currently blocked in select()/poll(). Pass over both the + // currently blocked in <select>/<poll>. Pass over both the // <Event_Handler> *and* the <mask> to allow the caller to dictate // which <Event_Handler> method the <ACE_Select_Reactor> will // invoke. The <ACE_Time_Value> indicates how long to blocking @@ -321,7 +321,7 @@ public: // Default size of the Select_Reactor's handle table. }; - ACE_Select_Reactor_Impl (); + ACE_Select_Reactor_Impl (void); friend class ACE_Select_Reactor_Notify; friend class ACE_Select_Reactor_Handler_Repository; @@ -341,14 +341,14 @@ protected: // Table that maps <ACE_HANDLEs> to <ACE_Event_Handler *>'s. ACE_Select_Reactor_Handle_Set wait_set_; - // Tracks handles that are waited for by select(). + // Tracks handles that are waited for by <select>. ACE_Select_Reactor_Handle_Set suspend_set_; // Tracks handles that are currently suspended. ACE_Select_Reactor_Handle_Set ready_set_; // Track HANDLES we are interested in for various events that must - // be dispatched *without* going through select(). + // be dispatched *without* going through <select>. ACE_Timer_Queue *timer_queue_; // Defined as a pointer to allow overriding by derived classes... @@ -378,7 +378,7 @@ protected: int requeue_position_; // Position that the main ACE_Select_Reactor thread is requeued in - // the list of waiters during a notify() callback. If this value == + // the list of waiters during a <notify> callback. If this value == // -1 we are requeued at the end of the list. Else if it's 0 then // we are requeued at the front of the list. Else if it's > 1 then // that indicates the number of waiters to skip over. diff --git a/ace/Select_Reactor_T.h b/ace/Select_Reactor_T.h index e4ee05b97ea..cf92a670f88 100644 --- a/ace/Select_Reactor_T.h +++ b/ace/Select_Reactor_T.h @@ -209,15 +209,16 @@ public: virtual int register_handler (ACE_Event_Handler *eh, ACE_Reactor_Mask mask); // Register a <eh> with a particular <mask>. Note that the - // <Select_Reactor> will call eh->get_handle() to extract the - // underlying I/O handle. + // <Select_Reactor> will call <ACE_Event_Handler::get_handle> to + // extract the underlying I/O handle. virtual int register_handler (ACE_HANDLE handle, ACE_Event_Handler *eh, ACE_Reactor_Mask mask); // Register a <eh> with a particular <mask>. Note that since the // <handle> is given the Select_Reactor will *not* call - // eh->get_handle() to extract the underlying I/O handle. + // <ACE_Event_Handler::get_handle> to extract the underlying I/O + // handle. #if defined (ACE_WIN32) @@ -265,7 +266,8 @@ public: // Removes the <mask> binding of <eh> from the Select_Reactor. If // there are no more bindings for this <eh> then it is removed from // the Select_Reactor. Note that the Select_Reactor will call - // eh->get_handle() to extract the underlying I/O handle. + // <ACE_Event_Handler::get_handle> to extract the underlying I/O + // handle. virtual int remove_handler (ACE_HANDLE handle, ACE_Reactor_Mask); @@ -388,7 +390,7 @@ public: ACE_Time_Value * = 0); // Called by a thread when it wants to unblock the Select_Reactor. // This wakeups the <ACE_Select_Reactor> if currently blocked in - // select()/poll(). Pass over both the <Event_Handler> *and* the + // <select>/<poll>. Pass over both the <Event_Handler> *and* the // <mask> to allow the caller to dictate which <Event_Handler> // method the <Select_Reactor> will invoke. The <ACE_Time_Value> // indicates how long to blocking trying to notify the @@ -414,11 +416,11 @@ public: virtual void requeue_position (int); // Set position that the main ACE_Select_Reactor thread is requeued in the - // list of waiters during a notify() callback. + // list of waiters during a <notify> callback. virtual int requeue_position (void); // Get position that the main ACE_Select_Reactor thread is requeued in the - // list of waiters during a notify() callback. + // list of waiters during a <notify> callback. // = Low-level wait_set mask manipulation methods. virtual int mask_ops (ACE_Event_Handler *eh, diff --git a/ace/Service_Config.h b/ace/Service_Config.h index de6e960da81..3042310dd8a 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -185,26 +185,26 @@ public: // Run the event loop until the <ACE_Reactor::handle_events> method // returns -1 or the <end_reactor_event_loop> method is invoked. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::run_event_loop() instead. + // Use <ACE_Reactor::run_event_loop> instead. static int run_reactor_event_loop (ACE_Time_Value &tv); // Run the event loop until the <ACE_Reactor::handle_events> method // returns -1, the <end_reactor_event_loop> method is invoked, or the // <ACE_Time_Value> expires. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::run_event_loop() instead. + // <Use ACE_Reactor::run_event_loop> instead. static int end_reactor_event_loop (void); // Instruct the <ACE_Service_Config> to terminate its event loop and // notifies the <ACE_Reactor::instance> so that it can wake up // and close down gracefully. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::end_event_loop() instead. + // Use <ACE_Reactor::end_event_loop> instead. static int reactor_event_loop_done (void); // Report if the Reactor's event loop is finished. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::event_loop_done() instead. + // Use <ACE_Reactor::event_loop_done> instead. static int reconfig_occurred (void); // True if reconfiguration occurred. @@ -228,46 +228,46 @@ public: static ACE_Reactor *reactor (void); // Get pointer to a process-wide <ACE_Reactor>. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::instance() instead. + // Use <ACE_Reactor::instance> instead. static ACE_Reactor *reactor (ACE_Reactor *); // Set pointer to a process-wide <ACE_Reactor> and return existing // pointer. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Reactor::instance() instead. + // Use <ACE_Reactor::instance> instead. static ACE_Service_Repository *svc_rep (void); // Get pointer to a process-wide <ACE_Service_Repository>. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Service_Repository::instance() instead. + // Use <ACE_Service_Repository::instance> instead. static ACE_Service_Repository *svc_rep (ACE_Service_Repository *); // Set pointer to a process-wide <ACE_Service_Repository> and return // existing pointer. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Service_Repository::instance() instead. + // Use <ACE_Service_Repository::instance> instead. static ACE_Thread_Manager *thr_mgr (void); // Get pointer to a process-wide <ACE_Thread_Manager>. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Thread_Manager::instance() instead. + // Use <ACE_Thread_Manager::instance> instead. static ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *); // Set pointer to a process-wide <ACE_Thread_Manager> and return // existing pointer. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Thread_Manager::instance() instead. + // Use <ACE_Thread_Manager::instance> instead. static ACE_Allocator *alloc (void); // Get pointer to a default <ACE_Allocator>. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Allocator::instance() instead. + // Use <ACE_Allocator::instance> instead. static ACE_Allocator *alloc (ACE_Allocator *); // Set pointer to a process-wide <ACE_Allocator> and return existing // pointer. // DO NOT USE THIS METHOD. It may be unsupported in future releases. - // Use ACE_Allocator::instance() instead. + // Use <ACE_Allocator::instance> instead. // = Utility methods. static int initialize (const ACE_Service_Type *, @@ -285,11 +285,11 @@ public: static int suspend (const ASYS_TCHAR svc_name[]); // Suspend <svc_name>. Note that this will not unlink the service - // from the daemon if it was dynamically linked, it will mark it - // as being suspended in the Service Repository and call the - // suspend() member function on the appropriate ACE_Service_Object. - // A service can be resumed later on by calling the RESUME() - // member function... + // from the daemon if it was dynamically linked, it will mark it as + // being suspended in the Service Repository and call the <suspend> + // member function on the appropriate <ACE_Service_Object>. A + // service can be resumed later on by calling the <RESUME> member + // function... static int remove (const ASYS_TCHAR svc_name[]); // Totally remove <svc_name> from the daemon by removing it diff --git a/ace/Service_Object.h b/ace/Service_Object.h index e6e9817345b..4a54586ec68 100644 --- a/ace/Service_Object.h +++ b/ace/Service_Object.h @@ -96,7 +96,7 @@ public: void active (int); void fini (void); - // Calls fini() on <type_> + // Calls <fini> on <type_> int fini_called (void) const; // Check if the service has been fini'ed. @@ -127,7 +127,7 @@ private: // 1 if svc is currently active, otherwise 0. int fini_already_called_; - // 1 if fini() on <type_> has already been called, otherwise 0. + // 1 if <fini> on <type_> has already been called, otherwise 0. }; class ACE_Export ACE_Service_Object_Ptr diff --git a/ace/Signal.h b/ace/Signal.h index d9901345263..bc2c83c240c 100644 --- a/ace/Signal.h +++ b/ace/Signal.h @@ -247,7 +247,7 @@ public: static void dispatch (int, siginfo_t *, ucontext_t *); // Callback routine registered with sigaction(2) that dispatches the - // handle_signal() method of the appropriate pre-registered + // <handle_signal> method of the appropriate pre-registered // ACE_Event_Handler. void dump (void) const; @@ -362,7 +362,7 @@ public: static void dispatch (int signum, siginfo_t *, ucontext_t *); // Callback routine registered with sigaction(2) that dispatches the - // handle_signal() method of all the pre-registered + // <handle_signal> method of all the pre-registered // ACE_Event_Handlers for <signum> void dump (void) const; diff --git a/ace/Singleton.h b/ace/Singleton.h index 9bef9acf126..0d3d6d65f74 100644 --- a/ace/Singleton.h +++ b/ace/Singleton.h @@ -116,7 +116,7 @@ class ACE_Unmanaged_Singleton : public ACE_Singleton <TYPE, ACE_LOCK> // destroys the instance. Unlike with <ACE_Singleton>, the // application is responsible for explicitly destroying the // instance after it is no longer needed (if it wants to avoid - // memory leaks, at least). The close () static member function + // memory leaks, at least). The <close> static member function // must be used to explicitly destroy the Singleton. // public: @@ -202,7 +202,7 @@ class ACE_Unmanaged_TSS_Singleton : public ACE_TSS_Singleton <TYPE, ACE_LOCK> // <ACE_Singleton>, the application is responsible for // explicitly destroying the instance after it is no longer // needed (if it wants to avoid memory leaks, at least). The - // close () static member function must be used to explicitly + // <close> static member function must be used to explicitly // destroy the Singleton. // public: diff --git a/ace/Stats.h b/ace/Stats.h index 83feaea3939..5b1f568441e 100644 --- a/ace/Stats.h +++ b/ace/Stats.h @@ -146,7 +146,7 @@ public: // scale factor, it successively tries to reduce it. Returns -1 if // there is overflow even with a 0 scale factor. - void reset (); + void reset (void); // Initialize internal state. static void quotient (const ACE_UINT64 dividend, diff --git a/ace/Strategies.h b/ace/Strategies.h index 1574557cf37..29ad3d01c2e 100644 --- a/ace/Strategies.h +++ b/ace/Strategies.h @@ -64,7 +64,7 @@ class ACE_Export ACE_Reactor_Notification_Strategy : public ACE_Notification_Str // // = DESCRIPTION // Integrates the ACE_Message_Queue notification into the - // ACE_Reactor::notify() method. + // <ACE_Reactor::notify> method. public: ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor, ACE_Event_Handler *eh, diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp index 9185bf10b2d..6c446c2c7db 100644 --- a/ace/Strategies_T.cpp +++ b/ace/Strategies_T.cpp @@ -28,10 +28,24 @@ ACE_Singleton_Strategy<SVC_HANDLER>::open (SVC_HANDLER *sh, { ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::open"); - if (this->svc_handler_ != 0) + if (this->delete_svc_handler_ + && this->svc_handler_ != 0) delete this->svc_handler_; - this->svc_handler_ = sh; + // If <sh> is NULL then create a new <SVC_HANDLER>. + if (sh == 0) + { + ACE_NEW_RETURN (this->svc_handler_, + SVC_HANDLER, + -1); + this->delete_svc_handler_ = 1; + } + else + { + this->svc_handler_ = sh; + this->delete_svc_handler_ = 0; + } + return 0; } @@ -218,20 +232,22 @@ ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler { ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler"); // Call up to our parent to do the SVC_HANDLER initialization. - if (this->inherited::activate_svc_handler (svc_handler, arg) == -1) + if (this->inherited::activate_svc_handler (svc_handler, + arg) == -1) return -1; else // Turn the <svc_handler> into an active object (if it isn't // already one as a result of the first activation...) - return svc_handler->activate (this->thr_flags_, this->n_threads_); + return svc_handler->activate (this->thr_flags_, + this->n_threads_); } template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy -(const ACE_PEER_ACCEPTOR_ADDR &local_addr, - int restart, - ACE_Reactor *reactor) - : reactor_ (reactor) + (const ACE_PEER_ACCEPTOR_ADDR &local_addr, + int restart, + ACE_Reactor *reactor) + : reactor_ (reactor) { ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy"); @@ -395,7 +411,9 @@ ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::ACE_Cache ACE_NEW (this->reverse_lock_, REVERSE_MUTEX (*this->lock_)); - if (this->open (cre_s, con_s, rec_s) == -1) + if (this->open (cre_s, + con_s, + rec_s) == -1) ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Cached_Connect_Strategy::ACE_Cached_Connect_Strategy"))); diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h index ab700219755..1c1d0a33711 100644 --- a/ace/Strategies_T.h +++ b/ace/Strategies_T.h @@ -129,6 +129,9 @@ public: protected: SVC_HANDLER *svc_handler_; // Pointer to the Singleton svc_handler. + + int delete_svc_handler_; + // Keep track of whether we need to delete the <SVC_HANDLER>. }; template <class SVC_HANDLER> @@ -196,7 +199,7 @@ class ACE_Concurrency_Strategy // // = DESCRIPTION // Default behavior is to activate the SVC_HANDLER by calling - // its open() method (which allows the SVC_HANDLER to define its + // its <open> method (which allows the SVC_HANDLER to define its // own concurrency strategy). However, subclasses can override // this default strategy to do more sophisticated concurrency // activations (such as creating the SVC_HANDLER as an active @@ -210,7 +213,7 @@ public: void *arg = 0); // Activate the <svc_handler> with an appropriate concurrency // strategy. The default behavior of this method is to activate the - // SVC_HANDLER by calling its open() method (which allows the + // SVC_HANDLER by calling its <open> method (which allows the // SVC_HANDLER to define its own concurrency strategy). virtual ~ACE_Concurrency_Strategy (void); @@ -316,7 +319,7 @@ public: void *arg = 0); // Activate the <svc_handler> with an appropriate concurrency // strategy. This method activates the SVC_HANDLER by first calling - // its open() method and then calling its activate() method to turn + // its <open> method and then calling its <activate> method to turn // it into an active object. void dump (void) const; @@ -332,7 +335,7 @@ protected: // Thread manager for this class (must be provided). long thr_flags_; - // Flags to pass into the SVC_HANDLER::activate() method. + // Flags to pass into the <SVC_HANDLER::activate> method. size_t n_threads_; // Number of threads to spawn. @@ -375,7 +378,7 @@ public: void *arg = 0); // Activate the <svc_handler> with an appropriate concurrency // strategy. This method activates the SVC_HANDLER by first forking - // and then calling the open() method of the SVC_HANDLER in the + // and then calling the <open> method of the SVC_HANDLER in the // child. void dump (void) const; diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i index 80932a5ea73..096a1e046c4 100644 --- a/ace/Strategies_T.i +++ b/ace/Strategies_T.i @@ -24,17 +24,22 @@ ACE_Recycling_Strategy<SVC_HANDLER>::prepare_for_recycling (SVC_HANDLER *svc_han template <class SVC_HANDLER> ASYS_INLINE ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy (SVC_HANDLER *sh, ACE_Thread_Manager *tm) - : svc_handler_ (0) + : svc_handler_ (0), + delete_svc_handler_ (1) { ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy"); - this->open (sh, tm); + if (this->open (sh, tm) == -1) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ACE_Singleton_Strategy"))); } template <class SVC_HANDLER> ASYS_INLINE ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy (void) { ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy"); - delete this->svc_handler_; + if (this->delete_svc_handler_ != 0) + delete this->svc_handler_; } // Create a Singleton SVC_HANDLER by always returning the same @@ -61,7 +66,10 @@ template <class SVC_HANDLER> ASYS_INLINE ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy (ACE_Thread_Manager *thr_mgr) { ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy"); - this->open (thr_mgr); + if (this->open (thr_mgr) == -1) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ACE_Creation_Strategy"))); } // Default behavior is to make a new SVC_HANDLER, passing in the @@ -94,8 +102,11 @@ ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (const char dll_name[], if (this->open (dll_name, factory_function, svc_name, - svc_rep, thr_mgr) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("open"))); + svc_rep, + thr_mgr) == -1) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("open"))); } template <class SVC_HANDLER> ASYS_INLINE @@ -124,8 +135,11 @@ ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy (ACE_Reactor *reactor, { ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"); - if (this->open (reactor, mask, flags) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), + if (this->open (reactor, + mask, + flags) == -1) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"))); } @@ -152,7 +166,10 @@ ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_m { ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy"); - if (this->open (thr_mgr, thr_flags, n_threads, flags) == -1) + if (this->open (thr_mgr, + thr_flags, + n_threads, + flags) == -1) ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy"))); @@ -237,10 +254,13 @@ ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy (size_t n_processes, int avoid_zombies) { ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy"); - this->open (n_processes, - acceptor, - reactor, - avoid_zombies); + if (this->open (n_processes, + acceptor, + reactor, + avoid_zombies) == -1) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ACE_Process_Strategy"))); } template <class SVC_HANDLER> ASYS_INLINE diff --git a/ace/Stream.h b/ace/Stream.h index 58fd26c2b61..a7c2df28139 100644 --- a/ace/Stream.h +++ b/ace/Stream.h @@ -63,7 +63,7 @@ public: // Create a Stream consisting of <head> and <tail> as the Stream // head and Stream tail, respectively. If these are 0 then the // <ACE_Stream_Head> and <ACE_Stream_Tail> are used, respectively. - // <arg> is the value past in to the open() methods of the tasks. + // <arg> is the value past in to the <open> methods of the tasks. virtual int open (void *arg, ACE_Module<ACE_SYNCH_USE> *head = 0, @@ -71,7 +71,7 @@ public: // Create a Stream consisting of <head> and <tail> as the Stream // head and Stream tail, respectively. If these are 0 then the // <ACE_Stream_Head> and <ACE_Stream_Tail> are used, respectively. - // <arg> is the value past in to the open() methods of the tasks. + // <arg> is the value past in to the <open> methods of the tasks. virtual int close (int flags = M_DELETE); // Close down the stream and release all the resources. @@ -94,7 +94,7 @@ public: virtual int remove (const ASYS_TCHAR *mod, int flags = M_DELETE); // Remove the named module <mod> from the stream. This bypasses the - // strict LIFO ordering of push() and pop(). + // strict LIFO ordering of <push> and <pop>. virtual ACE_Module<ACE_SYNCH_USE> *head (void); // Return current stream head. diff --git a/ace/Synch_T.h b/ace/Synch_T.h index fecba0de29d..354585f8602 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -104,15 +104,15 @@ class ACE_Reverse_Lock : public ACE_Lock // // = DESCRIPTION // This is an interesting adapter class that changes a lock into - // a reverse lock, i.e., acquire() on this class calls release() - // on the lock, and release() on this class calls acquire() on + // a reverse lock, i.e., <acquire> on this class calls <release> + // on the lock, and <release> on this class calls <acquire> on // the lock. // // One motivation for this class is when we temporarily want to // release a lock (which we have already acquired) but then // reaquire it soon after. An alternative design would be to - // add a Anti_Guard or Reverse_Guard class which would release() - // on construction and acquire() destruction. However, there + // add a Anti_Guard or Reverse_Guard class which would <release> + // on construction and <acquire> destruction. However, there // are *many* varieties of the Guard class and this design // choice would lead to at least 6 new classes. One new // ACE_Reverse_Lock class seemed more reasonable. @@ -302,14 +302,14 @@ class ACE_TSS // // = DESCRIPTION // This class is a wrapper around the OS thread library - // thread-specific functions. It uses the C++ operator->() to + // thread-specific functions. It uses the <C++ operator->> to // shield applications from the details of accessing // thread-specific storage. // // NOTE: TYPE cannot be a built-in type, but instead must be a // user-defined class. (Some compilers will allow a built-in // type, but shouldn't. Sun C++ won't, properly detecting the - // improper return type from operator-> ().) See template class + // improper return type from <operator->>.) See template class // ACE_TSS_Type_Adapter, below, for adapting built-in types to // work with ACE_TSS. public: @@ -318,7 +318,7 @@ public: ACE_TSS (TYPE *ts_obj = 0); // If caller has passed us a non-NULL ts_obj *, then we'll just use // this to initialize the thread-specific value (but only for the - // calling thread). Thus, subsequent calls to operator->() in this + // calling thread). Thus, subsequent calls to <operator->> in this // thread will return this value. This is useful since it enables // us to assign objects to thread-specific data that have // arbitrarily complex constructors. @@ -497,37 +497,28 @@ class ACE_Write_Guard : public ACE_Guard<ACE_LOCK> public: // = Initialization method. - ACE_Write_Guard (ACE_LOCK &m): ACE_Guard<ACE_LOCK> (&m) - { - this->acquire_write (); - } + ACE_Write_Guard (ACE_LOCK &m); // Implicitly and automatically acquire a write lock. - ACE_Write_Guard (ACE_LOCK &m, int block): ACE_Guard<ACE_LOCK> (&m) - { - if (block) - this->acquire_write (); - else - this->tryacquire_write (); - } + ACE_Write_Guard (ACE_LOCK &m, int block); // Implicitly and automatically acquire (or try to acquire) a write // lock. // = Lock accessors. - int acquire_write (void) { return this->owner_ = this->lock_->acquire_write (); } + int acquire_write (void); // Explicitly acquire the write lock. - int acquire (void) { return this->owner_ = this->lock_->acquire_write (); } + int acquire (void); // Explicitly acquire the write lock. - int tryacquire_write (void) { return this->owner_ = this->lock_->tryacquire_write (); } + int tryacquire_write (void); // Conditionally acquire the write lock (i.e., won't block). - int tryacquire (void) { return this->owner_ = this->lock_->tryacquire_write (); } + int tryacquire (void); // Conditionally acquire the write lock (i.e., won't block). - // Utility methods. + // = Utility methods. void dump (void) const; // Dump the state of an object. @@ -547,33 +538,25 @@ class ACE_Read_Guard : public ACE_Guard<ACE_LOCK> public: // = Initialization methods. - ACE_Read_Guard (ACE_LOCK& m): ACE_Guard<ACE_LOCK> (&m) - { - this->acquire_read (); - } - - ACE_Read_Guard (ACE_LOCK &m, int block): ACE_Guard<ACE_LOCK> (&m) - { - if (block) - this->acquire_read (); - else - this->tryacquire_read (); - } + ACE_Read_Guard (ACE_LOCK& m); + // Implicitly and automatically acquire a read lock. + + ACE_Read_Guard (ACE_LOCK &m, int block); // Implicitly and automatically acquire (or try to acquire) a read // lock. // = Lock accessors. - int acquire_read (void) { return this->owner_ = this->lock_->acquire_read (); } + int acquire_read (void); // Explicitly acquire the read lock. - int acquire (void) { return this->owner_ = this->lock_->acquire_read (); } + int acquire (void); // Explicitly acquire the read lock. - int tryacquire_read (void) { return this->owner_ = this->lock_->tryacquire_read (); } + int tryacquire_read (void); // Conditionally acquire the read lock (i.e., won't block). - int tryacquire (void) { return this->owner_ = this->lock_->tryacquire_read (); } + int tryacquire (void); // Conditionally acquire the read lock (i.e., won't block). // = Utility methods. @@ -602,7 +585,7 @@ class ACE_TSS_Guard // This data structure is meant to be used within a method or // function... It performs automatic aquisition and release of // a synchronization object. Moreover, it ensures that the lock - // is released even if a thread exits via "thr_exit()"! + // is released even if a thread exits via <thr_exit>! public: // = Initialization and termination methods. diff --git a/ace/Synch_T.i b/ace/Synch_T.i index cb190580243..2a14fd7a399 100644 --- a/ace/Synch_T.i +++ b/ace/Synch_T.i @@ -7,14 +7,16 @@ template <class ACE_LOCK> ACE_INLINE ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l) - : lock_ (&l), owner_ (0) + : lock_ (&l), + owner_ (0) { this->acquire (); } template <class ACE_LOCK> ACE_INLINE ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block) - : lock_ (&l), owner_ (0) + : lock_ (&l), + owner_ (0) { if (block) this->acquire (); @@ -31,24 +33,18 @@ ACE_Guard<ACE_LOCK>::~ACE_Guard (void) this->release (); } -// Implicitly release the lock. - template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::acquire (void) { return this->owner_ = this->lock_->acquire (); } -// Explicitly acquire the lock. - template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::tryacquire (void) { return this->owner_ = this->lock_->tryacquire (); } -// Conditionally acquire the lock (i.e., won't block). - template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::release (void) { @@ -61,23 +57,101 @@ ACE_Guard<ACE_LOCK>::release (void) return 0; } -// Explicitly release the lock, but only if it is held! - template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::locked (void) { return this->owner_ != -1; } -// 1 if locked, 0 if couldn't acquire the lock -// (errno will contain the reason for this). - template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::remove (void) { return this->lock_->remove (); } -// Explicitly remove the lock. + +template <class ACE_LOCK> ACE_INLINE +ACE_Write_Guard<ACE_LOCK>::ACE_Write_Guard (ACE_LOCK &m) + : ACE_Guard<ACE_LOCK> (&m) +{ + this->acquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE +ACE_Write_Guard<ACE_LOCK>::ACE_Write_Guard (ACE_LOCK &m, + int block) + : ACE_Guard<ACE_LOCK> (&m) +{ + if (block) + this->acquire_write (); + else + this->tryacquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Write_Guard<ACE_LOCK>::acquire_write (void) +{ + return this->owner_ = this->lock_->acquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Write_Guard<ACE_LOCK>::acquire (void) +{ + return this->owner_ = this->lock_->acquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Write_Guard<ACE_LOCK>::tryacquire_write (void) +{ + return this->owner_ = this->lock_->tryacquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Write_Guard<ACE_LOCK>::tryacquire (void) +{ + return this->owner_ = this->lock_->tryacquire_write (); +} + +template <class ACE_LOCK> ACE_INLINE +ACE_Read_Guard<ACE_LOCK>::ACE_Read_Guard (ACE_LOCK &m) + : ACE_Guard<ACE_LOCK> (&m) +{ + this->acquire_read (); +} + +template <class ACE_LOCK> ACE_INLINE +ACE_Read_Guard<ACE_LOCK>::ACE_Read_Guard (ACE_LOCK &m, + int block) + : ACE_Guard<ACE_LOCK> (&m) +{ + if (block) + this->acquire_read (); + else + this->tryacquire_read (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Read_Guard<ACE_LOCK>::acquire_read (void) +{ + return this->owner_ = this->lock_->acquire_read (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Read_Guard<ACE_LOCK>::acquire (void) +{ + return this->owner_ = this->lock_->acquire_read (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Read_Guard<ACE_LOCK>::tryacquire_read (void) +{ + return this->owner_ = this->lock_->tryacquire_read (); +} + +template <class ACE_LOCK> ACE_INLINE int +ACE_Read_Guard<ACE_LOCK>::tryacquire (void) +{ + return this->owner_ = this->lock_->tryacquire_read (); +} template <class ACE_LOCKING_MECHANISM> ACE_INLINE ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter (ACE_LOCKING_MECHANISM &lock) diff --git a/ace/TP_Reactor.h b/ace/TP_Reactor.h index 6f5bd35886f..dfa7061980a 100644 --- a/ace/TP_Reactor.h +++ b/ace/TP_Reactor.h @@ -13,7 +13,7 @@ // TP_Reactor (ala, Thread Pool Reactor) uses the leader-follower // model to demultiplex requests among a bunch of threads. // Basically, when using thread pool reactor, one will pre-spawn a -// _fixed_ number of threads. When you issue the run_event_loop () +// _fixed_ number of threads. When you issue the <run_event_loop> // method, one of the thread will become the leader thread and wait // for an event. The other threads (followers) will be lined up // and waiting for their turns to become the leader. When an event @@ -78,14 +78,14 @@ class ACE_Export ACE_TP_Reactor : public ACE_Select_Reactor // One of the short comings of the Select_Reactor in ACE is that // it did not support a thread pool based event dispatching // model, similar to the one in WFMO_Reactor. In - // Select_Reactor, only thread can be blocked in handle_events() + // Select_Reactor, only thread can be blocked in <handle_events> // at any given time. // // A new Reactor has been added to ACE that removes this // short-coming. TP_Reactor is a specialization of Select // Reactor to support thread-pool based event dispatching. This // Reactor takes advantage of the fact that events reported by - // select() are persistent if not acted upon immediately. It + // <select> are persistent if not acted upon immediately. It // works by remembering the event handler that just got // activated, releasing the internal lock (so that some other // thread can start waiting in the event loop) and then @@ -161,7 +161,7 @@ protected: ACE_Handle_Set& dispatch_mask, ACE_Handle_Set& ready_mask, ACE_EH_PTMF callback); - // Overwrites ACE_Select_Reactor::dispatch_io_set() to *not* + // Overwrites <ACE_Select_Reactor::dispatch_io_set> to *not* // dispatch any event handlers. The information of one activated // event handler is stored away, so that the event handler can be // dispatch later. diff --git a/ace/Task.h b/ace/Task.h index f0433ed308e..bc196ba7446 100644 --- a/ace/Task.h +++ b/ace/Task.h @@ -83,9 +83,9 @@ public: // interpret this as a flag to shut down the <Task>. virtual int module_closed (void); - // Hook called during ACE_Module::close(). The default + // Hook called during <ACE_Module::close>. The default // implementation calls forwards the call to close(1). Please - // notice the changed value of the default argument of close(). + // notice the changed value of the default argument of <close>. // This allows tasks to differ between the call has been originated // from <ACE_Thread_Exit> or from <module_closed>. Be aware that // close(0) will be also called when a thread associated with the diff --git a/ace/Task_T.h b/ace/Task_T.h index 60b4ef5c5dc..0fb31c4aa78 100644 --- a/ace/Task_T.h +++ b/ace/Task_T.h @@ -117,8 +117,8 @@ public: // Should be protected: int flush (u_long flag = ACE_Task_Flags::ACE_FLUSHALL); // Flush the queue. Note that if this conflicts with the C++ - // iostream flush() function, just rewrite the iostream function as - // ::flush(). + // iostream <flush> function, just rewrite the iostream function as + // ::<flush>. // = Special routines corresponding to certain message types. diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index cfe72b4122d..c3aa1565ae3 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -84,31 +84,31 @@ class ACE_Export ACE_At_Thread_Exit friend class ACE_Thread_Manager; public: // Default constructor - ACE_At_Thread_Exit(void); + ACE_At_Thread_Exit (void); // The destructor - virtual ~ACE_At_Thread_Exit(void); + virtual ~ACE_At_Thread_Exit (void); - // At_Thread_Exit has the ownership? - int is_owner() const; + // <At_Thread_Exit> has the ownership? + int is_owner (void) const; - // Set the ownership of the At_Thread_Exit - int is_owner(int owner); + // Set the ownership of the <At_Thread_Exit>. + int is_owner (int owner); - // This At_Thread_Exit was applied? - int was_applied() const; + // This <At_Thread_Exit> was applied? + int was_applied (void) const; - // Set applied state of At_Thread_Exit - int was_applied(int applied); + // Set applied state of <At_Thread_Exit>. + int was_applied (int applied); protected: - ACE_At_Thread_Exit* next_; - // The next At_Thread_Exit hook in the list. + ACE_At_Thread_Exit *next_; + // The next <At_Thread_Exit> hook in the list. // Do the apply if necessary - void do_apply(); + void do_apply (void); - virtual void apply() = 0; + virtual void apply (void) = 0; // The apply method. ACE_Thread_Descriptor* td_; @@ -125,24 +125,24 @@ class ACE_Export ACE_At_Thread_Exit_Func : public ACE_At_Thread_Exit { public: // Constructor - ACE_At_Thread_Exit_Func(void* object, - ACE_CLEANUP_FUNC func, - void* param = 0); + ACE_At_Thread_Exit_Func (void *object, + ACE_CLEANUP_FUNC func, + void *param = 0); virtual ~ACE_At_Thread_Exit_Func (void); protected: - void* object_; + void *object_; // The object to be cleanup ACE_CLEANUP_FUNC func_; // The cleanup func - void* param_; + void *param_; // A param if required // The apply method - void apply(); + void apply (void); }; #endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */ @@ -352,10 +352,10 @@ class ACE_Export ACE_Thread_Manager // correctly, you are probably doing something wrong. Rule of // thumb, use ACE_Thread to manage your daemon threads. // - // Notice that if there're threads live beyond the scope of main (), - // you are sure to have resource leaks in your program. Remember - // to wait on threads before exiting main() if that could happen - // in your programs. + // Notice that if there're threads live beyond the scope of + // <main>, you are sure to have resource leaks in your program. + // Remember to wait on threads before exiting <main> if that + // could happen in your programs. public: friend class ACE_Thread_Control; #if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT) @@ -415,14 +415,14 @@ public: int open (size_t size = 0); // No-op. Currently unused. - int close (); + int close (void); // Release all resources. // By default, this method will wait till all threads // exit. However, when called from <close_singleton>, most global resources // are destroyed and thus, we don't try to wait but just clean up the thread // descriptor list. - // The ACE_thread_t * argument to each of the spawn () family member + // The <ACE_thread_t> * argument to each of the <spawn> family member // functions is interpreted and used as shown in the following // table. NOTE: the final option, to provide task names, is _only_ // supported on VxWorks! @@ -501,7 +501,7 @@ public: // failure. If <abandon_detached_threads> is set, wait will first // check thru its thread list for threads with THR_DETACHED or // THR_DAEMON flags set and remove these threads. Notice that - // unlike other wait_* function, by default, wait () does wait on + // unlike other wait_* function, by default, <wait> does wait on // all thread spawned by this thread_manager no matter the detached // flags are set or not unless it is called with // <abandon_detached_threads> flag set. diff --git a/ace/Timeprobe_T.h b/ace/Timeprobe_T.h index 5e327de33bc..1e97bb1cd45 100644 --- a/ace/Timeprobe_T.h +++ b/ace/Timeprobe_T.h @@ -33,7 +33,7 @@ class ACE_Timeprobe // pointer copies are done and the string data is *not* copied. // // The recorded time probes can then be printed by calling - // print_times(). If you have used unsigned longs as event + // <print_times>. If you have used unsigned longs as event // descriptions in any of your time probes, you must have // provided an event description table that maps the unsigned // longs to readable strings. This map is a simple array of @@ -43,7 +43,7 @@ class ACE_Timeprobe // necessary. // // Multiple maps can also be used to chunk up the time probes. - // Each one can be added by calling event_descriptions(). + // Each one can be added by calling <event_descriptions>. // Different tables are used internally by consulting the // minimum_id for each table. It is up to the user to make sure // that multiple tables do not share the same event id range. diff --git a/ace/Timer_Queue_T.h b/ace/Timer_Queue_T.h index 9c619b6ac9f..5e0af5c0b6f 100644 --- a/ace/Timer_Queue_T.h +++ b/ace/Timer_Queue_T.h @@ -278,7 +278,7 @@ public: virtual void return_node (ACE_Timer_Node_T<TYPE> *); // Method used to return a timer node to the queue's ownership - // after it is returned by a method like remove_first () + // after it is returned by a method like <remove_first>. protected: /* virtual */ void upcall (TYPE &type, diff --git a/ace/Token.h b/ace/Token.h index 9d38626a426..18f7e9ac4d6 100644 --- a/ace/Token.h +++ b/ace/Token.h @@ -109,7 +109,7 @@ public: // thing to do (since it makes it possible for shared data to be // changed unexpectedly) so use with caution... // This method maintians the original token priority. - // As in acquire(), the <timeout> value is an absolute time. + // As in <acquire>, the <timeout> value is an absolute time. int tryacquire (void); // Become interface-compliant with other lock mechanisms (implements @@ -154,7 +154,7 @@ public: ACE_thread_t current_owner (void); // Return the id of the current thread that owns the token. - int signal_all_threads (); + int signal_all_threads (void); // Force all threads waiting to acquire the token to return one by // one. The method sets the <signal_all_thread_> to non-zero if // there're threads waiting, and returns the number of threads diff --git a/ace/Token_Collection.h b/ace/Token_Collection.h index 075cee8757d..e85b45e76c4 100644 --- a/ace/Token_Collection.h +++ b/ace/Token_Collection.h @@ -55,7 +55,7 @@ class ACE_Export ACE_Token_Collection : public ACE_Token_Proxy // = BUGS // Although ACE_Token_Collection inherits from ACE_Token_Proxy, it - // can not be including in a collection. This is because clone() + // can not be including in a collection. This is because <clone> // returns zero for now. public: ACE_Token_Collection (int debug = 0, diff --git a/ace/Token_Request_Reply.h b/ace/Token_Request_Reply.h index d08a5a74df5..28501c63678 100644 --- a/ace/Token_Request_Reply.h +++ b/ace/Token_Request_Reply.h @@ -154,7 +154,7 @@ private: // Max micro seconds to wait for token if not blocking forever. ACE_UINT32 arg_; - // value returned in Token_Reply::arg (); + // value returned in <Token_Reply::arg>; char data_[ACE_MAXTOKENNAMELEN + ACE_MAXCLIENTIDLEN + 3]; // The data portion contains the <tokenName_> including a 0 terminator, diff --git a/ace/UPIPE_Connector.h b/ace/UPIPE_Connector.h index 17e78076186..cae79c148ac 100644 --- a/ace/UPIPE_Connector.h +++ b/ace/UPIPE_Connector.h @@ -58,7 +58,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int connect (ACE_UPIPE_Stream &new_stream, @@ -81,7 +81,7 @@ public: // the default value of <ACE_Addr::sap_any> then the user is letting // the OS do the binding. If <reuse_addr> == 1 then the // <local_addr> is reused, even if it hasn't been cleanedup yet. - // The <flags> and <perms> arguments are passed down to the open() + // The <flags> and <perms> arguments are passed down to the <open> // method. int reset_new_handle (ACE_HANDLE handle); diff --git a/ace/WFMO_Reactor.h b/ace/WFMO_Reactor.h index a9863b094d4..4cbb941312e 100644 --- a/ace/WFMO_Reactor.h +++ b/ace/WFMO_Reactor.h @@ -400,7 +400,7 @@ class ACE_Export ACE_WFMO_Reactor_Notify : public ACE_Reactor_Notify // This implementation is necessary for cases where the // <ACE_WFMO_Reactor> is run in a multi-threaded program. In // this case, we need to be able to unblock - // WaitForMultipleObjects() when updates occur other than in the + // <WaitForMultipleObjects> when updates occur other than in the // main <ACE_WFMO_Reactor> thread. To do this, we signal an // auto-reset event the <ACE_WFMO_Reactor> is listening on. If // an <ACE_Event_Handler> and <ACE_Reactor_Mask> is passed to @@ -510,9 +510,10 @@ class ACE_Export ACE_WFMO_Reactor : public ACE_Reactor_Impl // handle_close on the handler when it is finally removed and // not when remove_handler is called. If the handler is not // going to be around when the WFMO_Reactor calls - // handler->handle_close(), use the DONT_CALL flag with - // remove_handler(). Or else, dynamically allocate the handler, - // and then call "delete this" inside handler->handle_close(). + // <ACE_Event_Handler::handle_close>, use the DONT_CALL flag + // with <remove_handler>. Or else, dynamically allocate the + // handler, and then call "delete this" inside + // <ACE_Event_Handler::handle_close>. public: friend class ACE_WFMO_Reactor_Handler_Repository; friend class ACE_WFMO_Reactor_Test; @@ -728,7 +729,7 @@ public: virtual int suspend_handler (ACE_Event_Handler *event_handler); // Suspend <event_handler> temporarily. Use - // <event_handler->get_handle()> to get the handle. + // <ACE_Event_Handler::get_handle> to get the handle. virtual int suspend_handler (ACE_HANDLE handle); // Suspend <handle> temporarily. @@ -740,8 +741,8 @@ public: // Suspend all <handles> temporarily. virtual int resume_handler (ACE_Event_Handler *event_handler); - // Resume <event_handler>. Use <event_handler->get_handle()> to get - // the handle. + // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to + // get the handle. virtual int resume_handler (ACE_HANDLE handle); // Resume <handle>. @@ -945,7 +946,7 @@ protected: virtual int ok_to_wait (ACE_Time_Value *max_wait_time, int alertable); - // Check to see if it is ok to enter ::WaitForMultipleObjects(). + // Check to see if it is ok to enter <::WaitForMultipleObjects>. virtual int wait_for_multiple_events (int timeout, int alertable); |