diff options
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Dev_Poll_Reactor.cpp | 29 | ||||
-rw-r--r-- | ACE/ace/Encoding_Converter_Factory.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/FILE_Connector.h | 2 | ||||
-rw-r--r-- | ACE/ace/Handle_Ops.h | 2 | ||||
-rw-r--r-- | ACE/ace/POSIX_Proactor.cpp | 12 | ||||
-rw-r--r-- | ACE/ace/SSL/SSL_Context.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/config-vxworks6.6.h | 2 |
7 files changed, 28 insertions, 25 deletions
diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp index 3d2915f45fa..f1b0d236cc9 100644 --- a/ACE/ace/Dev_Poll_Reactor.cpp +++ b/ACE/ace/Dev_Poll_Reactor.cpp @@ -920,7 +920,7 @@ ACE_Dev_Poll_Reactor::work_pending (const ACE_Time_Value & max_wait_time) ACE_MT (ACE_Countdown_Time countdown (&mwt)); Token_Guard guard (this->token_); - int result = guard.acquire_quietly (&mwt); + int const result = guard.acquire_quietly (&mwt); // If the guard is NOT the owner just return the retval if (!guard.is_owner ()) @@ -949,18 +949,17 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time) // additional events. ACE_Time_Value timer_buf (0); - ACE_Time_Value *this_timeout = 0; - - this_timeout = this->timer_queue_->calculate_timeout (max_wait_time, - &timer_buf); + ACE_Time_Value *this_timeout = + this_timeout = this->timer_queue_->calculate_timeout (max_wait_time, + &timer_buf); // Check if we have timers to fire. - const int timers_pending = + int const timers_pending = ((this_timeout != 0 && max_wait_time == 0) || (this_timeout != 0 && max_wait_time != 0 && *this_timeout != *max_wait_time) ? 1 : 0); - const long timeout = + long const timeout = (this_timeout == 0 ? -1 /* Infinity */ : static_cast<long> (this_timeout->msec ())); @@ -968,7 +967,7 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time) #if defined (ACE_HAS_EVENT_POLL) // Wait for events. - const int nfds = ::epoll_wait (this->poll_fd_, + int const nfds = ::epoll_wait (this->poll_fd_, this->events_, this->size_, static_cast<int> (timeout)); @@ -988,7 +987,7 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time) dvp.dp_timeout = timeout; // Milliseconds // Poll for events - const int nfds = ACE_OS::ioctl (this->poll_fd_, DP_POLL, &dvp); + int const nfds = ACE_OS::ioctl (this->poll_fd_, DP_POLL, &dvp); // Retrieve the results from the pollfd array. this->start_pfds_ = dvp.dp_fds; @@ -1017,7 +1016,7 @@ ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value *max_wait_time) ACE_MT (ACE_Countdown_Time countdown (max_wait_time)); Token_Guard guard (this->token_); - int result = guard.acquire_quietly (max_wait_time); + int const result = guard.acquire_quietly (max_wait_time); // If the guard is NOT the owner just return the retval if (!guard.is_owner ()) @@ -1703,7 +1702,7 @@ ACE_Dev_Poll_Reactor::suspend_handlers (void) ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - const size_t len = this->handler_rep_.size (); + size_t const len = this->handler_rep_.size (); for (size_t i = 0; i < len; ++i) if (this->handler_rep_.suspended (i) == 0 @@ -1812,7 +1811,7 @@ ACE_Dev_Poll_Reactor::resume_handlers (void) ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - const size_t len = this->handler_rep_.size (); + size_t const len = this->handler_rep_.size (); for (size_t i = 0; i < len; ++i) if (this->handler_rep_.suspended (i) @@ -1898,7 +1897,7 @@ ACE_Dev_Poll_Reactor::schedule_timer (ACE_Event_Handler *event_handler, if (0 != this->timer_queue_) return this->timer_queue_->schedule - (event_handler, + (event_handler, arg, this->timer_queue_->gettimeofday () + delay, interval); @@ -2220,7 +2219,7 @@ ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, // Block out all signals until method returns. ACE_Sig_Guard sb; - const ACE_Reactor_Mask old_mask = this->handler_rep_.mask (handle); + ACE_Reactor_Mask const old_mask = this->handler_rep_.mask (handle); ACE_Reactor_Mask new_mask = old_mask; // Perform GET, CLR, SET, and ADD operations on the interest/wait @@ -2266,7 +2265,7 @@ ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, // Only attempt to alter events for the handle from the // "interest set" if it hasn't been suspended. - const short events = this->reactor_mask_to_poll_event (new_mask); + short const events = this->reactor_mask_to_poll_event (new_mask); #if defined (sun) // Apparently events cannot be updated on-the-fly on Solaris so diff --git a/ACE/ace/Encoding_Converter_Factory.cpp b/ACE/ace/Encoding_Converter_Factory.cpp index d0c99599870..8cf1ed22c3f 100644 --- a/ACE/ace/Encoding_Converter_Factory.cpp +++ b/ACE/ace/Encoding_Converter_Factory.cpp @@ -16,9 +16,9 @@ ACE_Encoding_Converter_Factory::create ( ACE_Encoding_Converter_Factory::Encoding_Hint hint) { #if defined (ACE_BIG_ENDIAN) - bool convert_for_bigendian = true; + bool const convert_for_bigendian = true; #else - bool convert_for_bigendian = false; + bool const convert_for_bigendian = false; #endif /* ACE_BIG_ENDIAN */ ACE_Encoding_Converter* converter = 0; diff --git a/ACE/ace/FILE_Connector.h b/ACE/ace/FILE_Connector.h index 67eec840106..b02b01e7dbb 100644 --- a/ACE/ace/FILE_Connector.h +++ b/ACE/ace/FILE_Connector.h @@ -44,7 +44,7 @@ public: ACE_FILE_Connector (void); /** - * Actively ``connect'' and produce a @a new_io <ACE_FILE_IO> object + * Actively ``connect'' and produce a @a new_io ACE_FILE_IO object * if things go well. The @a remote_sap is the file that we are * trying to create/open. If it's the default value of * ACE_Addr::sap_any then the user is letting the OS create the diff --git a/ACE/ace/Handle_Ops.h b/ACE/ace/Handle_Ops.h index e349ed1b5cd..233c161fb03 100644 --- a/ACE/ace/Handle_Ops.h +++ b/ACE/ace/Handle_Ops.h @@ -31,7 +31,7 @@ class ACE_Time_Value; namespace ACE { /** - * Wait up to @a timeout> amount of time to actively open a device. + * Wait up to @a timeout amount of time to actively open a device. * This method doesn't perform the @c connect, it just does the * timed wait. */ diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 22ccf3aed15..1c2c271efb9 100644 --- a/ACE/ace/POSIX_Proactor.cpp +++ b/ACE/ace/POSIX_Proactor.cpp @@ -1422,7 +1422,7 @@ ACE_POSIX_AIOCB_Proactor::start_aio_i (ACE_POSIX_Asynch_Result *result) ACE_TRACE ("ACE_POSIX_AIOCB_Proactor::start_aio_i"); int ret_val; - const ACE_TCHAR *ptype; + const ACE_TCHAR *ptype = 0; // Start IO @@ -1443,7 +1443,9 @@ ACE_POSIX_AIOCB_Proactor::start_aio_i (ACE_POSIX_Asynch_Result *result) } if (ret_val == 0) - this->num_started_aio_++; + { + ++this->num_started_aio_; + } else // if (ret_val == -1) { if (errno == EAGAIN || errno == ENOMEM) //Ok, it will be deferred AIO @@ -1510,9 +1512,9 @@ ACE_POSIX_AIOCB_Proactor::start_deferred_aio () //AL notify user result_list_[i] = 0; - aiocb_list_cur_size_--; + --aiocb_list_cur_size_; - num_deferred_aiocb_ --; + --num_deferred_aiocb_; result->set_error (errno); result->set_bytes_transferred (0); @@ -1555,7 +1557,7 @@ ACE_POSIX_AIOCB_Proactor::cancel_aio (ACE_HANDLE handle) if (this->result_list_[ai]->aio_fildes != handle) // Not ours continue; - num_total++; + ++num_total; ACE_POSIX_Asynch_Result *asynch_result = this->result_list_[ai]; diff --git a/ACE/ace/SSL/SSL_Context.cpp b/ACE/ace/SSL/SSL_Context.cpp index da8e1438241..158f42e80d8 100644 --- a/ACE/ace/SSL/SSL_Context.cpp +++ b/ACE/ace/SSL/SSL_Context.cpp @@ -342,7 +342,7 @@ ACE_SSL_Context::load_trusted_ca (const char* ca_file, // Note: The STACK_OF(X509_NAME) pointer is a copy of the pointer in // the CTX; any changes to it by way of these function calls will // change the CTX directly. - STACK_OF (X509_NAME) * cert_names; + STACK_OF (X509_NAME) * cert_names = 0; cert_names = ::SSL_CTX_get_client_CA_list (this->context_); bool error = false; diff --git a/ACE/ace/config-vxworks6.6.h b/ACE/ace/config-vxworks6.6.h index 8b496fbc51a..72387205029 100644 --- a/ACE/ace/config-vxworks6.6.h +++ b/ACE/ace/config-vxworks6.6.h @@ -61,6 +61,8 @@ // If running an Intel Pentium the // ACE_OS::gethrtime () can use the RDTSC instruction. # define ACE_HAS_PENTIUM + // We seem to lack log2 also on pentium with rtp + # define ACE_LACKS_LOG2 #endif #else #if defined (CPU) && (CPU == PENTIUM || CPU == PENTIUM2 || CPU == PENTIUM3 || CPU == PENTIUM4) |