diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-26 22:38:49 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-26 22:38:49 +0000 |
commit | d86f427ede3d90e8f579a52061449d39a611bd55 (patch) | |
tree | 04db92726a3f75f550b325bd4924ec24b6bdebd6 | |
parent | 6ca4654f27f63096ee7f1f0c3b3b95b76d1ce5a1 (diff) | |
download | ATCD-d86f427ede3d90e8f579a52061449d39a611bd55.tar.gz |
I'm done
41 files changed, 373 insertions, 193 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 3ce0ec93ccc..c67ac81981e 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -18,6 +18,9 @@ ACE::register_stdin_handler (ACE_Event_Handler *eh, #if defined (ACE_WIN32) return thr_mgr->spawn (&ACE::read_adapter, eh, flags); #else + // Keep compilers happy. + flags = flags; + thr_mgr = thr_mgr; return reactor->register_handler (ACE_STDIN, eh, ACE_Event_Handler::READ_MASK); #endif /* ACE_WIN32 */ } @@ -433,7 +436,7 @@ ACE::handle_timed_complete (ACE_HANDLE h, if (n <= 0) { if (n == 0) - errno = ETIMEDOUT; + errno = ETIME; return ACE_INVALID_HANDLE; } // Check if the handle is ready for reading and the handle is *not* @@ -657,7 +660,7 @@ ACE::set_handle_limit (int new_limit) int ACE::set_flags (ACE_HANDLE handle, int flags) { - ACE_TRACE ("ACE::set_fl"); + ACE_TRACE ("ACE::set_flags"); #if defined (ACE_WIN32) switch (flags) { @@ -673,12 +676,13 @@ ACE::set_flags (ACE_HANDLE handle, int flags) return -1; } #else - int val; + int val = ACE_OS::fcntl (handle, F_GETFL, 0); - if ((val = ACE_OS::fcntl (handle, F_GETFL, 0)) == -1) + if (val == -1) return -1; - val |= flags; /* turn on flags */ + // Turn on flags. + ACE_SET_BITS (val, flags); if (ACE_OS::fcntl (handle, F_SETFL, val) == -1) return -1; @@ -692,7 +696,7 @@ ACE::set_flags (ACE_HANDLE handle, int flags) int ACE::clr_flags (ACE_HANDLE handle, int flags) { - ACE_TRACE ("ACE::clr_fl"); + ACE_TRACE ("ACE::clr_flags"); #if defined (ACE_WIN32) switch (flags) @@ -709,12 +713,13 @@ ACE::clr_flags (ACE_HANDLE handle, int flags) return -1; } #else - int val; + int val = ACE_OS::fcntl (handle, F_GETFL, 0); - if ((val = ACE_OS::fcntl (handle, F_GETFL, 0)) == -1) + if (val == -1) return -1; - val &= ~flags; /* turn flags off */ + // Turn flags off. + ACE_CLR_BITS (val, flags); if (ACE_OS::fcntl (handle, F_SETFL, val) == -1) return -1; @@ -736,3 +741,120 @@ ACE::map_errno (int error) return error; } + +ssize_t +ACE::send (ACE_HANDLE handle, + const void *buf, + size_t n, + int flags, + const ACE_Time_Value *tv) +{ + if (tv == 0) + return ACE::send (handle, buf, n, flags); + else + { + // We need to record whether we are already *in* nonblocking mode, + // so that we can correctly reset the state when we're done. + + int val = ACE::get_flags (handle); + + if (ACE_BIT_ENABLED (val, ACE_NONBLOCK) == 0) + // Set the descriptor into non-blocking mode if it's not already + // in it. + ACE::set_flags (handle, ACE_NONBLOCK); + + ACE_Time_Value timeout (*tv); + ACE_Time_Value start_time = ACE_OS::gettimeofday(); + + ssize_t bytes_written; + + // Use the non-timeout version to do the actual send. + bytes_written = ACE::send (handle, buf, n, flags); + + if (bytes_written == -1 && errno == EWOULDBLOCK) + { + // We couldn't send due to flow control. + + // Compute time that has elapsed thus far. + ACE_Time_Value elapsed_time = ACE_OS::gettimeofday () - start_time; + + if (elapsed_time > timeout) + // We've timed out, so break; + errno = ETIME; + else + { + // Update the timeout. + timeout -= elapsed_time; + + ACE_Handle_Set handle_set; + + handle_set.set_bit (handle); + + switch (ACE_OS::select (int (handle) + 1, + 0, // read_fds. + handle_set, // write_fds. + 0, // exception_fds. + timeout)) + { + case 0: + errno = ETIME; + /* FALLTHRU */ + default: + /* FALLTHRU */ + case -1: + break; + case 1: + // We should be able to send something now. + bytes_written = ACE::send (handle, buf, n, flags); + break; + } + } + } + + if (ACE_BIT_ENABLED (val, ACE_NONBLOCK) == 0) + { + // We need to stash errno here because ACE::clr_flags() may + // reset it. + int error = errno; + + // Only disable ACE_NONBLOCK if we weren't in non-blocking mode + // originally. + ACE::clr_flags (handle, ACE_NONBLOCK); + errno = error; + } + + return bytes_written; + } +} + +int +ACE::recv (ACE_HANDLE handle, + void *buf, + size_t n, + int flags, + const ACE_Time_Value *tv) +{ + if (tv == 0) + return ACE::recv (handle, buf, n, flags); + else + { + ACE_Handle_Set handle_set; + + handle_set.set_bit (handle); + + switch (ACE_OS::select (int (handle) + 1, + (fd_set *) handle_set, // read_fds. + (fd_set *) 0, // write_fds. + (fd_set *) 0, // exception_fds. + tv)) + { + case -1: + return -1; + case 0: + errno = ETIME; + return -1; + default: + return ACE::recv (handle, buf, n, flags); + } + } +} diff --git a/ace/ACE.h b/ace/ACE.h index 36536b0a57d..c6d97fa7e40 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -53,6 +53,16 @@ public: // Receive up to <len> bytes into <buf> from <handle> (uses the // <read> system call on UNIX and the <recv> call on Win32). + static ssize_t recv (ACE_HANDLE handle, + void *buf, + size_t len, + int flags, + const ACE_Time_Value *timeout); + // Wait up to <timeout> amount of time to receive up to <len> bytes + // into <buf> from <handle> (uses the <recv> call). If <recv> times + // out a -1 is returned with <errno == ETIME>. If it succeeds the + // number of bytes received is returned. + static ssize_t send (ACE_HANDLE handle, const void *buf, size_t len, @@ -62,6 +72,16 @@ public: static ssize_t send (ACE_HANDLE handle, const void *buf, + size_t len, + int flags, + const ACE_Time_Value *timeout); + // Wait to to <timeout> amount of time to send up to <len> bytes + // into <buf> from <handle> (uses the <send> call). If <send> times + // out a -1 is returned with <errno == ETIME>. If it succeeds the + // number of bytes sent is returned. + + static ssize_t send (ACE_HANDLE handle, + const void *buf, size_t len); // Send up to <len> bytes into <buf> from <handle> (uses the <write> // system call on UNIX and the <send> call on Win32). @@ -84,14 +104,14 @@ public: const void *buf, size_t len, int flags); - // Receive <len> bytes into <buf> from <handle> (uses the <send> - // system call). + // Send <len> bytes from <buf> to <handle> (uses the <send> system + // call). static ssize_t send_n (ACE_HANDLE handle, const void *buf, size_t len); - // Receive <len> bytes into <buf> from <handle> (uses the <write> - // system call on UNIX and the <recv> call on Win32). + // Send <len> bytes from <buf> to <handle> (uses the <write> system + // call on UNIX and the <recv> call on Win32). // = File system I/O functions that encapsulate differences between // UNIX and Win32 and also send and recv exactly n bytes. @@ -104,8 +124,8 @@ public: static ssize_t write_n (ACE_HANDLE handle, const void *buf, size_t len); - // Receive <len> bytes into <buf> from <handle> (uses the <write> - // system call on UNIX and the <WriteFile> call on Win32). + // Send <len> bytes from <buf> to <handle> (uses the <write> system + // call on UNIX and the <WriteFile> call on Win32). // = Functions that perform useful behavior related to establishing // socket connections active and passively. @@ -134,6 +154,7 @@ public: // This method doesn't perform the <connect>, it just does the timed // wait... + // = Set/get/clear various flags related to I/O HANDLE. static int set_flags (ACE_HANDLE handle, int flags); // Set flags associated with <handle>. @@ -142,6 +163,9 @@ public: int flags); // Clear flags associated with <handle>. + static int get_flags (ACE_HANDLE handle); + // Return the current setting of flags associated with <handle>. + static int set_handle_limit (int new_limit = -1); // Reset the limit on the number of open handles. If <new_limit> == // -1 set the limit to the maximum allowable. Otherwise, set it to diff --git a/ace/ACE.i b/ace/ACE.i index c8467a5cde9..7319faecd1d 100644 --- a/ace/ACE.i +++ b/ace/ACE.i @@ -13,10 +13,8 @@ ACE::send (ACE_HANDLE handle, const void *buf, size_t len) #if defined (ACE_WIN32) return ACE_OS::send (handle, (const char *) buf, len); -#elif defined (VXWORKS) - return ::write (handle, (char *) buf, len); #else - return ::write (handle, (const char *) buf, len); + return ACE_OS::write (handle, (const char *) buf, len); #endif /* ACE_WIN32 */ } @@ -59,3 +57,13 @@ ACE::strecpy (char *s, const char *t) return dscan - 1; } +// Return flags currently associated with handle. + +inline int +ACE::get_flags (ACE_HANDLE handle) +{ + ACE_TRACE ("ACE::get_flags"); + + return ACE_OS::fcntl (handle, F_GETFL, 0); +} + diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp index 2c54a2e9c25..c7f63b0b001 100644 --- a/ace/ARGV.cpp +++ b/ace/ARGV.cpp @@ -31,8 +31,8 @@ ACE_ARGV::dump (void) const ACE_ARGV::ACE_ARGV (char buf[], int substitute_env_args) - : argv_ (0), - argc_ (0), + : argc_ (0), + argv_ (0), buf_ (0) { ACE_TRACE ("ACE_ARGV::ACE_ARGV"); @@ -129,8 +129,8 @@ ACE_ARGV::ACE_ARGV (char buf[], ACE_ARGV::ACE_ARGV (char *argv[], int substitute_env_args) - : argv_ (0), - argc_ (0), + : argc_ (0), + argv_ (0), buf_ (0) { ACE_TRACE ("ACE_ARGV::ACE_ARGV"); diff --git a/ace/Event_Handler.i b/ace/Event_Handler.i index a1211800662..afbc1a43c8b 100644 --- a/ace/Event_Handler.i +++ b/ace/Event_Handler.i @@ -111,16 +111,14 @@ ACE_Event_Handler::handle_signal (int, siginfo_t *, ucontext_t *) } ACE_INLINE int -ACE_Event_Handler::handle_input_complete (ACE_Message_Block *message, - long bytes_transfered) +ACE_Event_Handler::handle_input_complete (ACE_Message_Block *, long) { ACE_TRACE ("ACE_Event_Handler::handle_input_complete"); return -1; } ACE_INLINE int -ACE_Event_Handler::handle_output_complete (ACE_Message_Block *message, - long bytes_transfered) +ACE_Event_Handler::handle_output_complete (ACE_Message_Block *, long) { ACE_TRACE ("ACE_Event_Handler::handle_input_complete"); return -1; diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp index 5279d4c6912..4fb3047675a 100644 --- a/ace/Get_Opt.cpp +++ b/ace/Get_Opt.cpp @@ -11,6 +11,24 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt) +ACE_Get_Opt::ACE_Get_Opt (int argc, + char **argv, + char *optstring, + int skip, + int report_errors) + : optarg (0), + optind (skip), + opterr (report_errors), + nargc (argc), + nargv (argv), + noptstring (optstring), + nextchar (0), + first_nonopt (skip), + last_nonopt (skip) +{ + ACE_TRACE ("ACE_Get_Opt::ACE_Get_Opt"); +} + void ACE_Get_Opt::dump (void) const { @@ -27,10 +45,10 @@ ACE_Get_Opt::operator () (void) ACE_TRACE ("ACE_Get_Opt::operator"); if (this->nextchar == 0 || *this->nextchar == 0) { - /* Special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ + // Special ARGV-element `--' means premature end of options. + // Skip it like a null option, then exchange with previous + // non-options as if it were an option, then skip everything + // else like a non-option. if (this->optind != this->nargc && !::strcmp (this->nargv[this->optind], "--")) { @@ -43,37 +61,38 @@ ACE_Get_Opt::operator () (void) this->optind = this->nargc; } - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ + // If we have done all the ARGV-elements, stop the scan and back + // over any non-options that we skipped and permuted. if (this->optind == this->nargc) { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ + // Set the next-arg-index to point at the non-options + // that we previously skipped, so the caller will digest them. if (this->first_nonopt != this->last_nonopt) this->optind = this->first_nonopt; return EOF; } - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ + // If we have come to a non-option and did not permute it, + // either stop the scan or describe it to the caller and pass it + // by. if (this->nargv[this->optind][0] != '-' || this->nargv[this->optind][1] == 0) return EOF; - /* We have found another option-ARGV-element. - Start decoding its characters. */ + // We have found another option-ARGV-element. Start decoding + // its characters. this->nextchar = this->nargv[this->optind] + 1; } - /* Look at and handle the next option-character. */ + // Look at and handle the next option-character. { char c = *this->nextchar++; char *temp = (char *) strchr (this->noptstring, c); - /* Increment `optind' when we start to process its last character. */ + // Increment `optind' when we start to process its last character. if (*this->nextchar == 0) this->optind++; @@ -94,7 +113,7 @@ ACE_Get_Opt::operator () (void) { if (temp[2] == ':') { - /* This is an option that accepts an argument optionally. */ + // This is an option that accepts an argument optionally. if (*this->nextchar != 0) { this->optarg = this->nextchar; @@ -106,12 +125,12 @@ ACE_Get_Opt::operator () (void) } else { - /* This is an option that requires an argument. */ + // This is an option that requires an argument. if (*this->nextchar != 0) { this->optarg = this->nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ + // If we end this ARGV-element by taking the rest as + // an arg, we must advance to the next element now. this->optind++; } else if (this->optind == this->nargc) @@ -122,8 +141,8 @@ ACE_Get_Opt::operator () (void) c = '?'; } else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ + // We already incremented `optind' once; increment it + // again when taking next ARGV-elt as argument. this->optarg = this->nargv[this->optind++]; this->nextchar = 0; } diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h index 0e26a51e807..61ecbbeddc4 100644 --- a/ace/Get_Opt.h +++ b/ace/Get_Opt.h @@ -59,7 +59,10 @@ class ACE_Export ACE_Get_Opt { public: - ACE_Get_Opt (int argc, char **argv, char *optstring, int skip_argv0 = 1, int report_errors = 0); + ACE_Get_Opt (int argc, char **argv, + char *optstring, + int skip_argv0 = 1, + int report_errors = 0); // Initialize the internal data when the first call is made. Start // processing options with ARGV-element 0 + <skip_argv0>; the // sequence of previously skipped non-option ARGV-elements is empty. diff --git a/ace/Get_Opt.i b/ace/Get_Opt.i index 9481fc30145..b5a6d1869cd 100644 --- a/ace/Get_Opt.i +++ b/ace/Get_Opt.i @@ -3,21 +3,3 @@ // Get_Opt.i -ACE_INLINE -ACE_Get_Opt::ACE_Get_Opt (int argc, - char **argv, - char *optstring, - int skip, - int report_errors) - : opterr (report_errors), - nextchar (0), - optarg (0), - first_nonopt (skip), - last_nonopt (skip), - optind (skip), - noptstring (optstring), - nargc (argc), - nargv (argv) -{ - ACE_TRACE ("ACE_Get_Opt::ACE_Get_Opt"); -} diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp index d20f114cb05..8e098cd879c 100644 --- a/ace/Handle_Set.cpp +++ b/ace/Handle_Set.cpp @@ -195,8 +195,8 @@ ACE_Handle_Set_Iterator::operator++ (void) ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &f) : handles_ (f), - index_ (0), - num_ (0) + num_ (0), + index_ (0) { ACE_TRACE ("ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator"); #if !defined(ACE_WIN32) diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp index 878f015f609..7b2b2051452 100644 --- a/ace/Local_Name_Space.cpp +++ b/ace/Local_Name_Space.cpp @@ -38,15 +38,15 @@ ACE_NS_String::char_rep (void) const } ACE_NS_String::ACE_NS_String (void) - : rep_ (0), - len_ (0) + : len_ (0), + rep_ (0) { ACE_TRACE ("ACE_NS_String::ACE_NS_String"); } ACE_NS_String::ACE_NS_String (const ACE_WString &s) - : rep_ (s.fast_rep ()), - len_ ((s.length () + 1) * sizeof (ACE_USHORT16)) + : len_ ((s.length () + 1) * sizeof (ACE_USHORT16)), + rep_ (s.fast_rep ()) { ACE_TRACE ("ACE_NS_String::ACE_NS_String"); } @@ -146,7 +146,6 @@ template class ACE_Set_Node<ACE_Name_Binding>; template class ACE_Guard<ACE_RW_Process_Mutex>; template class ACE_Read_Guard<ACE_RW_Process_Mutex>; template class ACE_Write_Guard<ACE_RW_Process_Mutex>; -template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; template class ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>; template class ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>; template class ACE_Map_Entry <ACE_NS_String, ACE_NS_Internal>; diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 1c7d6ab100f..098c7b5c034 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -301,9 +301,9 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::open (ACE_Naming_Context::Context_Sc template <ACE_MEM_POOL_1, class LOCK> ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::ACE_Local_Name_Space (void) - : name_space_map_ (0), - name_options_ (0), - allocator_ (0) + : allocator_ (0), + name_space_map_ (0), + name_options_ (0) { ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space"); } diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp index 9b39c22f451..0c8f12b0eae 100644 --- a/ace/Local_Tokens.cpp +++ b/ace/Local_Tokens.cpp @@ -26,8 +26,8 @@ ACE_Tokens::dump (void) const } ACE_Tokens::ACE_Tokens (void) - : reference_count_ (0), - visited_ (0) + : visited_ (0), + reference_count_ (0) { ACE_TRACE ("ACE_Tokens::ACE_Tokens"); } @@ -69,11 +69,11 @@ ACE_TPQ_Entry::dump (void) const ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy, const char *client_id) : cond_var_ (lock_), + next_ (0), // This const typecast is safe. proxy_ ((ACE_Token_Proxy *) new_proxy), nesting_level_ (0), - sleep_hook_ (0), - next_ (0) + sleep_hook_ (0) { ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry"); @@ -1405,4 +1405,5 @@ ACE_Token_Name::dump (void) const template class ACE_TSS <ACE_TPQ_Entry>; #endif /* ACE_NO_TSS_TOKENS */ template class ACE_Unbounded_Stack <ACE_TPQ_Entry *>; +template class ACE_Stack_Node <ACE_TPQ_Entry *>; #endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h index 6d5786f2658..177de5515fd 100644 --- a/ace/Local_Tokens.h +++ b/ace/Local_Tokens.h @@ -124,22 +124,21 @@ public: void call_sleep_hook (void); // Call the sleep hook function or method passing arg. - ACE_TPQ_Entry *next_; - // Pointer to next in list. - void dump (void) const; // Dump the state of the class. // = Used to block the thread if an acquire fails with EWOULDBLOCK. - ACE_TOKEN_CONST::MUTEX lock_; ACE_TOKEN_CONST::COND_VAR cond_var_; + ACE_TOKEN_CONST::MUTEX lock_; + + ACE_TPQ_Entry *next_; + // Pointer to next in list. // = Get/set whether this client is blocked waiting for a token. int waiting (void) const; void waiting (int w); private: - int waiting_; // This client is waiting for a token. @@ -432,7 +431,7 @@ public: ACE_Mutex_Token (const char* name); // life - ~ACE_Mutex_Token (void); + virtual ~ACE_Mutex_Token (void); // death // = Synchronization operations. @@ -519,7 +518,7 @@ public: ACE_RW_Token (const char* name); // Life. - ~ACE_RW_Token (void); + virtual ~ACE_RW_Token (void); // Death. // = Synchronization operations. @@ -614,7 +613,7 @@ public: ACE_Token_Name (const ACE_Token_Name &rhs); // Copy construction. - ~ACE_Token_Name (void); + virtual ~ACE_Token_Name (void); // Death. void operator= (const ACE_Token_Name &rhs); @@ -676,7 +675,7 @@ public: ACE_Token_Proxy (void); // Construction. - ~ACE_Token_Proxy (void); + virtual ~ACE_Token_Proxy (void); // Death. virtual int open (const char *name, diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 31015bddf5b..21525d93060 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -224,13 +224,13 @@ ACE_Log_Msg::ACE_Log_Msg (void) : status_ (0), errnum_ (0), linenum_ (0), - ostream_ (0), restart_ (1), // Restart by default... - thr_state_ (0), + ostream_ (0), trace_depth_ (0), thr_handle_ (0), trace_active_ (0), tracing_enabled_ (0), // Off by default? + thr_state_ (0), priority_mask_ (LM_SHUTDOWN // By default, all priorities are enabled. | LM_TRACE | LM_DEBUG @@ -601,8 +601,7 @@ ACE_Log_Msg::log (const char *format_str, if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR)) log_record.print (ACE_Log_Msg::local_host_, ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::VERBOSE), - stderr, - bp - this->msg ()); + stderr); if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER)) { ACE_Str_Buf log_msg ((void *) &log_record, @@ -627,8 +626,7 @@ ACE_Log_Msg::log (const char *format_str, && this->msg_ostream () != 0) log_record.print (ACE_Log_Msg::local_host_, ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::VERBOSE), - *this->msg_ostream (), - bp - this->msg ()); + *this->msg_ostream ()); this->start_tracing (); } diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h index 724fe70dee3..b14b6d2b79a 100644 --- a/ace/Log_Msg.h +++ b/ace/Log_Msg.h @@ -311,6 +311,12 @@ private: int trace_depth_; // Depth of the nesting for printing traces. + ACE_hthread_t *thr_handle_; + // If we're running in the context of an <ACE_Thread_Manager> this + // will point to the <thr_handle_> field in the + // <ACE_Thread_Descriptor>. Threads can use this to rapidly + // determine their real ACE_hthread_t. + int trace_active_; // Are we already within an ACE_Trace constructor call? @@ -323,12 +329,6 @@ private: // <ACE_Thread_Descriptor>. Threads can use this to rapidly // determine if they've got a cancellation pending. - ACE_hthread_t *thr_handle_; - // If we're running in the context of an <ACE_Thread_Manager> this - // will point to the <thr_handle_> field in the - // <ACE_Thread_Descriptor>. Threads can use this to rapidly - // determine their real ACE_hthread_t. - u_long priority_mask_; // Keeps track of all the <ACE_Log_Priority> values that are // currently enabled. Default is for all logging priorities to be diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp index cee731cb0da..17a72d61761 100644 --- a/ace/Log_Record.cpp +++ b/ace/Log_Record.cpp @@ -68,8 +68,7 @@ ACE_Log_Record::ACE_Log_Record (void) int ACE_Log_Record::print (const char host_name[], int verbose, - FILE *fp, - size_t len) + FILE *fp) { // ACE_TRACE ("ACE_Log_Record::print"); @@ -100,8 +99,7 @@ ACE_Log_Record::print (const char host_name[], int ACE_Log_Record::print (const char host_name[], int verbose, - ostream &s, - size_t len) + ostream &s) { // ACE_TRACE ("ACE_Log_Record::print"); diff --git a/ace/Log_Record.h b/ace/Log_Record.h index 273e185c3c6..acdc0d25b05 100644 --- a/ace/Log_Record.h +++ b/ace/Log_Record.h @@ -51,15 +51,13 @@ friend ostream &operator << (ostream &, ACE_Log_Record &); int print (const char host_name[], int verbose = 1, - FILE *fp = stderr, - size_t msg_data_len = 0); + FILE *fp = stderr); // Write the contents of the logging record to the appropriate // <FILE>. int print (const char host_name[], int verbose, - ostream &stream, - size_t msg_data_len = 0); + ostream &stream); // Write the contents of the logging record to the appropriate // <ostream>. diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 8c79cf07c5a..27b07b8dc10 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -14,23 +14,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Malloc) template <class MALLOC> -ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options, - const char *pool_name, - const char *lock_name) - : allocator_ (options, pool_name, lock_name) -{ - ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); -} - -template <class MALLOC> -ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options, - const char *pool_name) - : allocator_ (options, pool_name) -{ - ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); -} - -template <class MALLOC> ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const char *pool_name, const char *lock_name) : allocator_ (pool_name, lock_name) diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h index a86199bc850..0b834444840 100644 --- a/ace/Malloc_T.h +++ b/ace/Malloc_T.h @@ -32,7 +32,7 @@ class ACE_Allocator_Adapter : public ACE_Allocator public: // Trait. typedef MALLOC ALLOCATOR; - typedef ALLOCATOR::MEMORY_POOL_OPTIONS MEMORY_POOL_OPTIONS; + typedef MALLOC::MEMORY_POOL_OPTIONS MEMORY_POOL_OPTIONS; // = Initialization. ACE_Allocator_Adapter (const char *pool_name = 0); @@ -42,11 +42,21 @@ public: // Constructor. ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options, const char *pool_name, - const char *lock_name); - // Constructor. + const char *lock_name) + : allocator_ (options, pool_name, lock_name) + { + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); + } + + // Constructor (must be here to avoid template bugs). ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options, - const char *pool_name = 0); + const char *pool_name = 0) + : allocator_ (options, pool_name) + { + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); + } + // Constructor. // = Memory Management diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp index 8a7794346bd..ac5dc94fcd9 100644 --- a/ace/Map_Manager.cpp +++ b/ace/Map_Manager.cpp @@ -45,10 +45,10 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::dump (void) const template <class EXT_ID, class INT_ID, class LOCK> ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::ACE_Map_Manager (size_t size, ACE_Allocator *allocator) - : allocator_ (0), + : search_structure_ (0), + allocator_ (0), max_size_ (0), - cur_size_ (0), - search_structure_ (0) + cur_size_ (0) { ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::ACE_Map_Manager"); @@ -58,10 +58,10 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::ACE_Map_Manager (size_t size, template <class EXT_ID, class INT_ID, class LOCK> ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::ACE_Map_Manager (ACE_Allocator *allocator) - : allocator_ (0), + : search_structure_ (0), + allocator_ (0), max_size_ (0), - cur_size_ (0), - search_structure_ (0) + cur_size_ (0) { ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::ACE_Map_Manager"); if (this->open (DEFAULT_SIZE, allocator) == -1) diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp index 9f392f85f15..4e41dd06f01 100644 --- a/ace/Mem_Map.cpp +++ b/ace/Mem_Map.cpp @@ -152,8 +152,8 @@ ACE_Mem_Map::map (const char file_name[], } ACE_Mem_Map::ACE_Mem_Map (void) - : length_ (0), - base_addr_ (0), + : base_addr_ (0), + length_ (0), handle_ (ACE_INVALID_HANDLE), file_mapping_ (ACE_INVALID_HANDLE), close_handle_ (0) @@ -173,8 +173,8 @@ ACE_Mem_Map::ACE_Mem_Map (const char file_name[], void *addr, off_t pos) : base_addr_ (0), - close_handle_ (0), - file_mapping_ (ACE_INVALID_HANDLE) + file_mapping_ (ACE_INVALID_HANDLE), + close_handle_ (0) { ACE_TRACE ("ACE_Mem_Map::ACE_Mem_Map"); if (this->map (file_name, len, flags, mode, prot, share, addr, pos) < 0) @@ -190,8 +190,8 @@ ACE_Mem_Map::ACE_Mem_Map (ACE_HANDLE handle, int share, void *addr, off_t pos) - : close_handle_ (0), - file_mapping_ (ACE_INVALID_HANDLE) + : file_mapping_ (ACE_INVALID_HANDLE), + close_handle_ (0) { ACE_TRACE ("ACE_Mem_Map::ACE_Mem_Map"); diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp index 387d7b57a55..aff78d903dc 100644 --- a/ace/Memory_Pool.cpp +++ b/ace/Memory_Pool.cpp @@ -349,14 +349,14 @@ ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const OPTIONS &options, } int -ACE_Lite_MMAP_Memory_Pool::sync (ssize_t len, int flags) +ACE_Lite_MMAP_Memory_Pool::sync (ssize_t, int) { ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::sync"); return 0; } int -ACE_Lite_MMAP_Memory_Pool::sync (void *addr, size_t len, int flags) +ACE_Lite_MMAP_Memory_Pool::sync (void *, size_t, int) { ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::sync"); return 0; @@ -500,7 +500,7 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *) return 0; } -ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const OPTIONS &options, +ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const OPTIONS &, const char *) { ACE_TRACE ("ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool"); @@ -509,7 +509,7 @@ ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const OPTIONS &options, ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Sig_Handler::register_handler")); } -ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const char *pool_name) +ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const char *) { ACE_TRACE ("ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool"); diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h index ef264634089..93fbc81214f 100644 --- a/ace/Memory_Pool.h +++ b/ace/Memory_Pool.h @@ -276,9 +276,9 @@ public: use_fixed_addr_ (use_fixed_addr), write_each_page_ (write_each_page) {} + char *base_addr_; int use_fixed_addr_; int write_each_page_; - char *base_addr_; }; class ACE_Export ACE_MMAP_Memory_Pool : public ACE_Event_Handler diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp index 30b8a77abaa..20d528dd1f6 100644 --- a/ace/Message_Queue.cpp +++ b/ace/Message_Queue.cpp @@ -39,8 +39,8 @@ ACE_Message_Queue<ACE_SYNCH_2>::dump (void) const template <ACE_SYNCH_1> ACE_Message_Queue<ACE_SYNCH_2>::ACE_Message_Queue (size_t hwm, size_t lwm) - : notfull_cond_ (this->lock_), - notempty_cond_ (this->lock_) + : notempty_cond_ (this->lock_), + notfull_cond_ (this->lock_) { ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_2>::ACE_Message_Queue"); if (this->open (hwm, lwm) == -1) diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp index ce94ea1d12d..2fc724ca535 100644 --- a/ace/Naming_Context.cpp +++ b/ace/Naming_Context.cpp @@ -549,9 +549,11 @@ ACE_Name_Options::parse_args (int argc, char *argv[]) #if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) template class ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; -template class ACE_Local_Name_Space <ACE_Lite_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; +template class ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; +template class ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; +template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>; template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >; template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >; -ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >; -ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >; +template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >; +template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >; #endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ @@ -1996,7 +1996,7 @@ public: static int writev (ACE_HANDLE handle, ACE_WRITEV_TYPE *iov, int iovcnt); // = A set of wrappers for event demultiplexing and IPC. - static int select (int width, fd_set *rfds, fd_set *wfds, fd_set *efds, ACE_Time_Value *tv = 0); + static int select (int width, fd_set *rfds, fd_set *wfds, fd_set *efds, const ACE_Time_Value *tv = 0); static int select (int width, fd_set *rfds, fd_set *wfds, fd_set *efds, const ACE_Time_Value &tv); static int poll (struct pollfd *pollfds, u_long len, ACE_Time_Value *tv = 0); static int poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &tv); @@ -2066,7 +2066,7 @@ ACE_OS::gethostbyname (const char *name) ACE_INLINE int ACE_OS::select (int width, fd_set *rfds, fd_set *wfds, fd_set *efds, - ACE_Time_Value *timeout) + const ACE_Time_Value *timeout) { // ACE_TRACE ("ACE_OS::select"); ACE_SOCKCALL_RETURN (::select (width, @@ -5204,9 +5204,9 @@ ACE_OS::getenv (const char *symbol) ACE_INLINE ACE_Str_Buf::ACE_Str_Buf (void *b, int l, int max) - : buf (b), + : maxlen (max), len (l), - maxlen (max) + buf (b) { } diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp index 54379d8a28c..00db7991f7b 100644 --- a/ace/Proactor.cpp +++ b/ace/Proactor.cpp @@ -155,9 +155,9 @@ ACE_Overlapped_IO::operator ACE_OVERLAPPED * (void) } ACE_Proactor::ACE_Proactor (size_t number_of_threads) - : completion_port_ (0), - number_of_threads_ (number_of_threads), - timer_skew_ (0, ACE_TIMER_SKEW) + : timer_skew_ (0, ACE_TIMER_SKEW), + completion_port_ (0), + number_of_threads_ (number_of_threads) { #if defined (ACE_WIN32) // Create an "auto-reset" event to indicate that one or more I/O @@ -425,16 +425,16 @@ ACE_Proactor::initiate (ACE_Overlapped_IO *overlapped) ACE_Overlapped_File::ACE_Overlapped_File (const ACE_Overlapped_File &file) : offset_ (file.offset ()), - handle_ (file.get_handle ()), file_size_ (0), + handle_ (file.get_handle ()), delete_handle_ (0) { } ACE_Overlapped_File::ACE_Overlapped_File (void) : offset_ (0), - handle_ (ACE_INVALID_HANDLE), file_size_ (0), + handle_ (ACE_INVALID_HANDLE), delete_handle_ (0) { } diff --git a/ace/SOCK_IO.h b/ace/SOCK_IO.h index bc60e050a64..0f78d5fa827 100644 --- a/ace/SOCK_IO.h +++ b/ace/SOCK_IO.h @@ -43,6 +43,20 @@ public: ssize_t recv (iovec iov[], size_t n) const; // Recv a vector of n byte messages to the connected socket. + ssize_t send (const void *buf, size_t len, int flags, + const ACE_Time_Value *timeout); + // Wait to to <timeout> amount of time to send up to <len> bytes + // into <buf> from <handle> (uses the <send> call). If <send> times + // out a -1 is returned with <errno == ETIME>. If it succeeds the + // number of bytes sent is returned. + + ssize_t recv (void *buf, size_t len, int flags, + const ACE_Time_Value *timeout); + // Wait up to <timeout> amount of time to receive up to <len> bytes + // into <buf> from <handle> (uses the <recv> call). If <recv> times + // out a -1 is returned with <errno == ETIME>. If it succeeds the + // number of bytes received is returned. + ssize_t send (size_t n, ...) const; // Send varargs messages to the connected socket. diff --git a/ace/SOCK_IO.i b/ace/SOCK_IO.i index bfc6450d286..67ae7186bf6 100644 --- a/ace/SOCK_IO.i +++ b/ace/SOCK_IO.i @@ -67,7 +67,7 @@ ACE_SOCK_IO::recv (iovec iov[], size_t n) const inline ssize_t ACE_SOCK_IO::send (const void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const + ACE_OVERLAPPED *overlapped) const { ACE_TRACE ("ACE_SOCK_IO::send"); return ACE_OS::write (this->get_handle (), @@ -77,9 +77,25 @@ ACE_SOCK_IO::send (const void *buf, size_t n, inline ssize_t ACE_SOCK_IO::recv (void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const + ACE_OVERLAPPED *overlapped) const { ACE_TRACE ("ACE_SOCK_IO::recv"); return ACE_OS::read (this->get_handle (), (char *) buf, n, overlapped); } + +inline ssize_t +ACE_SOCK_IO::send (const void *buf, size_t len, int flags, + const ACE_Time_Value *timeout) +{ + ACE_TRACE ("ACE_SOCK_IO::send"); + return ACE::send (this->get_handle (), buf, len, flags, timeout); +} + +inline ssize_t +ACE_SOCK_IO::recv (void *buf, size_t len, int flags, + const ACE_Time_Value *timeout) +{ + ACE_TRACE ("ACE_SOCK_IO::recv"); + return ACE::recv (this->get_handle (), buf, len, flags, timeout); +} diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 36d1ec40672..96a1ad3e89b 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -555,7 +555,7 @@ ACE_Service_Config::open (const char program_name[]) // Only use STDERR if the users hasn't yet set the flags. if (ACE_LOG_MSG->open (program_name, - ACE_LOG_MSG->flags() ? ACE_LOG_MSG->flags() : ACE_Log_Msg::STDERR, + ACE_LOG_MSG->flags() ? ACE_LOG_MSG->flags() : (u_long) ACE_Log_Msg::STDERR, ACE_Service_Config::logger_key_) == -1) return -1; ACE_DEBUG ((LM_STARTUP, "starting up daemon %n\n")); @@ -916,8 +916,8 @@ ACE_Service_Config::reconfig_occurred (sig_atomic_t config_occurred) template class ACE_Set_Node<ACE_Static_Svc_Descriptor *>; template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>; template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>; -template class ACE_Malloc<ACE_Local_MEMORY_POOL, ACE_Null_Mutex>; -template class ACE_Allocator_Adapter<ACE_Malloc<ACE_Local_MEMORY_POOL, ACE_Null_Mutex> >; +template class ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>; +template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >; template class auto_ptr<ACE_Obstack>; #if !defined (ACE_HAS_THREADS) template class ACE_Guard<ACE_Null_Mutex>; diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp index 24af60fd277..fe316000bf0 100644 --- a/ace/Service_Repository.cpp +++ b/ace/Service_Repository.cpp @@ -17,9 +17,9 @@ ACE_Service_Repository::dump (void) const } ACE_Service_Repository::ACE_Service_Repository (void) - : current_size_ (0), + : service_vector_ (0), total_size_ (0), - service_vector_ (0) + current_size_ (0) { ACE_TRACE ("ACE_Service_Repository::ACE_Service_Repository"); } diff --git a/ace/Signal.cpp b/ace/Signal.cpp index 5acd5195d66..0c858aff023 100644 --- a/ace/Signal.cpp +++ b/ace/Signal.cpp @@ -238,27 +238,27 @@ ACE_Sig_Handler::dispatch (int signum, } ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Action &sa, int sigkey) - : sa_ (sa), + : sigkey_ (sigkey), type_ (SIG_ACTION), - sigkey_ (sigkey) + sa_ (sa) { ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter"); } ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Event_Handler *eh, int sigkey) - : eh_ (eh), + : sigkey_ (sigkey), type_ (ACE_HANDLER), - sigkey_ (sigkey) + eh_ (eh) { ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter"); } ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Handler_Ex sig_func, int sigkey) - : sig_func_ (sig_func), + : sigkey_ (sigkey), type_ (C_FUNCTION), - sigkey_ (sigkey) + sig_func_ (sig_func) { ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter"); } diff --git a/ace/Stream.cpp b/ace/Stream.cpp index 7b17d555b80..3b985d1cc95 100644 --- a/ace/Stream.cpp +++ b/ace/Stream.cpp @@ -470,8 +470,8 @@ template <ACE_SYNCH_1> ACE_INLINE ACE_Stream<ACE_SYNCH_2>::ACE_Stream (void * a, ACE_Module<ACE_SYNCH_2> *head, ACE_Module<ACE_SYNCH_2> *tail) - : final_close_ (this->lock_), - linked_us_ (0) + : linked_us_ (0), + final_close_ (this->lock_) { ACE_TRACE ("ACE_Stream<ACE_SYNCH_2>::ACE_Stream"); if (this->open (a, head, tail) == -1) @@ -484,8 +484,8 @@ ACE_INLINE ACE_Stream<ACE_SYNCH_2>::ACE_Stream (void *a, ACE_Multiplexor &muxer, ACE_Module<ACE_SYNCH_2> *head) - : final_close_ (this->lock_), - linked_us_ (0) + : linked_us_ (0), + final_close_ (this->lock_) { ACE_TRACE ("ACE_Stream<ACE_SYNCH_2>::ACE_Stream"); if (this->open (a, muxer, head) == -1) diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp index 499fb44ab56..4c797a7e8e9 100644 --- a/ace/Svc_Handler.cpp +++ b/ace/Svc_Handler.cpp @@ -181,7 +181,7 @@ template <PR_ST_1, ACE_SYNCH_1> ACE_INLINE ACE_PEER_STREAM & ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_2>::peer (void) const { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_2>::peer"); - return (PEER_STREAM &) this->peer_; + return (ACE_PEER_STREAM &) this->peer_; } // Extract the underlying PEER_STREAM (e.g., used by ACE_Connector and diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 1d5aca814a7..ef0583686bf 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -151,7 +151,7 @@ public: // since it enables us to assign objects to thread-specific data // that have arbitrarily complex constructors! - ~ACE_TSS (void); + virtual ~ACE_TSS (void); // Deregister with thread-key administration. TYPE *ts_object (void) const; diff --git a/ace/TLI_Stream.i b/ace/TLI_Stream.i index 646c25d8008..4c330dadfd7 100644 --- a/ace/TLI_Stream.i +++ b/ace/TLI_Stream.i @@ -71,17 +71,17 @@ inline ssize_t ACE_TLI_Stream::recv_n (void *buf, size_t n, int *flags) const { ACE_TRACE ("ACE_TLI_Stream::recv_n"); - int b_read = 0; - int b_recv = 0; - int f = 0; + ssize_t b_read = 0; + ssize_t b_recv = 0; + int f = 0; if (flags == 0) flags = &f; for (b_read = 0; b_read < n; b_read += b_recv) if ((b_recv = ACE_OS::t_rcv (this->get_handle (), - (char *) buf + b_read, - n - b_read, flags)) == -1) + (char *) buf + b_read, + n - b_read, flags)) == -1) return -1; else if (b_recv == 0) break; diff --git a/ace/Task.cpp b/ace/Task.cpp index e726a234af3..20e7dc4114a 100644 --- a/ace/Task.cpp +++ b/ace/Task.cpp @@ -131,14 +131,14 @@ ACE_Task<ACE_SYNCH_2>::dump (void) const template<ACE_SYNCH_1> ACE_Task<ACE_SYNCH_2>::ACE_Task (ACE_Thread_Manager *thr_man, ACE_Message_Queue<ACE_SYNCH_2> *mq) - : delete_msg_queue_ (0), + : thr_count_ (0), thr_mgr_ (thr_man), - mod_ (0), - flags_ (0), - grp_id_ (0), - thr_count_ (0), msg_queue_ (0), - next_ (0) + delete_msg_queue_ (0), + flags_ (0), + mod_ (0), + next_ (0), + grp_id_ (0) { ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::ACE_Task"); diff --git a/ace/Token_Invariants.cpp b/ace/Token_Invariants.cpp index 5687d0dfe37..1c0af209c9e 100644 --- a/ace/Token_Invariants.cpp +++ b/ace/Token_Invariants.cpp @@ -334,5 +334,10 @@ ACE_RWLock_Invariants::dump (void) const } #if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -// template class ACE_TSS <ACE_TPQ_Entry>; +template class ACE_Map_Manager<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>; +template class ACE_Map_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>; +template class ACE_Map_Entry<ACE_Token_Name, ACE_Mutex_Invariants *>; +template class ACE_Map_Manager<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>; +template class ACE_Map_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>; +template class ACE_Map_Entry<ACE_Token_Name, ACE_RWLock_Invariants *>; #endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/ace/config-aix-4.1.x.h b/ace/config-aix-4.1.x.h index 0f27126b334..6250f5154d1 100644 --- a/ace/config-aix-4.1.x.h +++ b/ace/config-aix-4.1.x.h @@ -1,8 +1,8 @@ /* -*- C++ -*- */ // $Id$ -// The following configuration file is designed to work for HP -// platforms running AIX 4.1.x. +// The following configuration file is designed to work for OS +// platforms running AIX 4.1.x using the IBM C++ compiler. #if !defined (ACE_CONFIG_H) #define ACE_CONFIG_H diff --git a/ace/config-sunos5.5-sunc++-4.x.h b/ace/config-sunos5.5-sunc++-4.x.h index 63b4aaea320..a3d9ebb70bc 100644 --- a/ace/config-sunos5.5-sunc++-4.x.h +++ b/ace/config-sunos5.5-sunc++-4.x.h @@ -8,6 +8,7 @@ #define ACE_CONFIG_H #define ACE_HAS_UNICODE +#define ACE_HAS_TEMPLATE_TYPEDEFS // Platform supports System V IPC (most versions of UNIX, but not Win32) #define ACE_HAS_SYSV_IPC |