diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-14 07:48:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-14 07:48:09 +0000 |
commit | 73c40510d6e8e33357a74cd111ea72c7344a6b51 (patch) | |
tree | 828fddbb1658e9fd9ee6dd015531060552157b0c /ACE/ace | |
parent | 42c0068ffdfe13d72f451986049ef2699230434b (diff) | |
download | ATCD-73c40510d6e8e33357a74cd111ea72c7344a6b51.tar.gz |
Sat Jul 14 07:47:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Future.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Handle_Set.h | 18 | ||||
-rw-r--r-- | ACE/ace/Handle_Set.inl | 3 | ||||
-rw-r--r-- | ACE/ace/High_Res_Timer.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 10 | ||||
-rw-r--r-- | ACE/ace/OS_NS_stropts.cpp | 44 | ||||
-rw-r--r-- | ACE/ace/Timer_Queue_Adapters.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Timer_Queue_T.h | 4 | ||||
-rw-r--r-- | ACE/ace/config-macosx-tiger.h | 5 |
9 files changed, 47 insertions, 49 deletions
diff --git a/ACE/ace/Future.cpp b/ACE/ace/Future.cpp index 730d17ebf9d..d86ad4d5a10 100644 --- a/ACE/ace/Future.cpp +++ b/ACE/ace/Future.cpp @@ -110,7 +110,7 @@ ACE_Future_Rep<T>::detach (ACE_Future_Rep<T>*& rep) // Use value_ready_mutex_ for both condition and ref count management ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, r_mon, rep->value_ready_mutex_)); - if (rep->ref_count_-- == 0) + if (--rep->ref_count_ == 0) { ACE_MT (r_mon.release ()); // We do not need the lock when deleting the representation. @@ -132,7 +132,7 @@ ACE_Future_Rep<T>::assign (ACE_Future_Rep<T>*& rep, ACE_Future_Rep<T>* new_rep) rep = new_rep; // detached old last for exception safety - if (old->ref_count_-- == 0) + if (--old->ref_count_ == 0) { ACE_MT (r_mon.release ()); // We do not need the lock when deleting the representation. diff --git a/ACE/ace/Handle_Set.h b/ACE/ace/Handle_Set.h index 90c7713a7c3..8b9edb4fd39 100644 --- a/ACE/ace/Handle_Set.h +++ b/ACE/ace/Handle_Set.h @@ -48,7 +48,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * This abstraction is a very efficient wrapper facade over * <fd_set>. In particular, no range checking is performed, so * it's important not to set or clear bits that are outside the - * <ACE_DEFAULT_SELECT_REACTOR_SIZE>. + * @c ACE_DEFAULT_SELECT_REACTOR_SIZE. */ class ACE_Export ACE_Handle_Set { @@ -76,18 +76,18 @@ public: void reset (void); /** - * Checks whether <handle> is enabled. No range checking is - * performed so <handle> must be less than - * <ACE_DEFAULT_SELECT_REACTOR_SIZE>. + * Checks whether @a handle is enabled. No range checking is + * performed so @a handle must be less than + * @c ACE_DEFAULT_SELECT_REACTOR_SIZE. */ int is_set (ACE_HANDLE handle) const; - /// Enables the <handle>. No range checking is performed so <handle> - /// must be less than <ACE_DEFAULT_SELECT_REACTOR_SIZE>. + /// Enables the @a handle. No range checking is performed so @a handle + /// must be less than @c ACE_DEFAULT_SELECT_REACTOR_SIZE. void set_bit (ACE_HANDLE handle); - /// Disables the <handle>. No range checking is performed so - /// <handle> must be less than <ACE_DEFAULT_SELECT_REACTOR_SIZE>. + /// Disables the @a handle. No range checking is performed so + /// @a handle must be less than @c ACE_DEFAULT_SELECT_REACTOR_SIZE. void clr_bit (ACE_HANDLE handle); /// Returns a count of the number of enabled bits. @@ -97,7 +97,7 @@ public: ACE_HANDLE max_set (void) const; /** - * Rescan the underlying <fd_set> up to handle <max> to find the new + * Rescan the underlying <fd_set> up to handle @a max to find the new * <max_handle> (highest bit set) and <size> (how many bits set) values. * This is useful for evaluating the changes after the handle set has * been manipulated in some way other than member functions; for example, diff --git a/ACE/ace/Handle_Set.inl b/ACE/ace/Handle_Set.inl index b6f77cfac93..a4b1fccaebb 100644 --- a/ACE/ace/Handle_Set.inl +++ b/ACE/ace/Handle_Set.inl @@ -84,6 +84,9 @@ ACE_Handle_Set::is_set (ACE_HANDLE handle) const return FD_ISSET (handle, &this->mask_) && this->size_ > 0; +#elif defined (ACE_HAS_NONCONST_FD_ISSET) + return FD_ISSET (handle, + const_cast<fd_set*> (&this->mask_)); #else return FD_ISSET (handle, &this->mask_); diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp index 832da28c8ca..02d26d95254 100644 --- a/ACE/ace/High_Res_Timer.cpp +++ b/ACE/ace/High_Res_Timer.cpp @@ -520,7 +520,7 @@ ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env) const char *env_value = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (env)); if (env_value != 0) { - int value = ACE_OS::atoi (env_value); + int const value = ACE_OS::atoi (env_value); if (value > 0) { ACE_High_Res_Timer::global_scale_factor (value); diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index 61f9d34b221..164a464888b 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -753,8 +753,8 @@ ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) result = -1; else { - // If there's no contention, just grab the lock immediately - // (since this is the common case we'll optimize for it). + // If there's no contention, just grab the lock immediately + // (since this is the common case we'll optimize for it). if (m->nesting_level_ == 0) m->owner_id_ = t_id; // If we already own the lock, then increment the nesting level @@ -771,9 +771,9 @@ ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) m->owner_id_ = t_id; } - // At this point, we can safely increment the nesting_level_ no - // matter how we got here! - m->nesting_level_++; + // At this point, we can safely increment the nesting_level_ no + // matter how we got here! + ++m->nesting_level_; } { diff --git a/ACE/ace/OS_NS_stropts.cpp b/ACE/ace/OS_NS_stropts.cpp index 6c46b27a77c..97855b388e9 100644 --- a/ACE/ace/OS_NS_stropts.cpp +++ b/ACE/ace/OS_NS_stropts.cpp @@ -100,31 +100,31 @@ ACE_OS::ioctl (ACE_HANDLE socket, if (result == SOCKET_ERROR) - { - unsigned long dwErr = ::WSAGetLastError (); - - if (dwErr == WSAEWOULDBLOCK) - { - errno = dwErr; - return -1; - } - else - if (dwErr != WSAENOBUFS) - { - errno = dwErr; - return -1; - } + { + unsigned long dwErr = ::WSAGetLastError (); + + if (dwErr == WSAEWOULDBLOCK) + { + errno = dwErr; + return -1; + } + else + if (dwErr != WSAENOBUFS) + { + errno = dwErr; + return -1; + } } - char *qos_buf; - ACE_NEW_RETURN (qos_buf, - char [dwBufferLen], - -1); + char *qos_buf = 0; + ACE_NEW_RETURN (qos_buf, + char [dwBufferLen], + -1); - QOS *qos = reinterpret_cast<QOS*> (qos_buf); + QOS *qos = reinterpret_cast<QOS*> (qos_buf); - result = ::WSAIoctl ((ACE_SOCKET) socket, - io_control_code, + result = ::WSAIoctl ((ACE_SOCKET) socket, + io_control_code, NULL, 0, qos, @@ -134,7 +134,7 @@ ACE_OS::ioctl (ACE_HANDLE socket, NULL); if (result == SOCKET_ERROR) - return result; + return result; ACE_Flow_Spec sending_flowspec (qos->SendingFlowspec.TokenRate, qos->SendingFlowspec.TokenBucketSize, diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp index 738e8f1d225..0b4042d1cd3 100644 --- a/ACE/ace/Timer_Queue_Adapters.cpp +++ b/ACE/ace/Timer_Queue_Adapters.cpp @@ -263,15 +263,15 @@ ACE_Thread_Timer_Queue_Adapter<TQ>::svc (void) { // Compute the remaining time, being careful not to sleep // for "negative" amounts of time. - const ACE_Time_Value tv_curr = this->timer_queue_->gettimeofday (); - const ACE_Time_Value tv_earl = this->timer_queue_->earliest_time (); + ACE_Time_Value const tv_curr = this->timer_queue_->gettimeofday (); + ACE_Time_Value const tv_earl = this->timer_queue_->earliest_time (); if (tv_earl > tv_curr) { // The earliest time on the Timer_Queue is in future, so // use ACE_OS::gettimeofday() to convert the tv to the // absolute time. - const ACE_Time_Value tv = ACE_OS::gettimeofday () + (tv_earl - tv_curr); + ACE_Time_Value const tv = ACE_OS::gettimeofday () + (tv_earl - tv_curr); // ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("waiting until %u.%3.3u secs\n"), // tv.sec(), tv.msec())); this->condition_.wait (&tv); diff --git a/ACE/ace/Timer_Queue_T.h b/ACE/ace/Timer_Queue_T.h index 69b71502eef..c539bd435a1 100644 --- a/ACE/ace/Timer_Queue_T.h +++ b/ACE/ace/Timer_Queue_T.h @@ -350,13 +350,13 @@ public: /// of day. void gettimeofday (ACE_Time_Value (*gettimeofday)(void)); - /// Determine the next event to timeout. Returns <max> if there are + /// Determine the next event to timeout. Returns @a max if there are /// no pending timers or if all pending timers are longer than max. /// This method acquires a lock internally since it modifies internal state. virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max); /** - * Determine the next event to timeout. Returns <max> if there are + * Determine the next event to timeout. Returns @a max if there are * no pending timers or if all pending timers are longer than max. * <the_timeout> should be a pointer to storage for the timeout value, * and this value is also returned. This method does not acquire a diff --git a/ACE/ace/config-macosx-tiger.h b/ACE/ace/config-macosx-tiger.h index 916d0bf4313..5bdc0fe7134 100644 --- a/ACE/ace/config-macosx-tiger.h +++ b/ACE/ace/config-macosx-tiger.h @@ -14,7 +14,6 @@ # include "ace/config-g++-common.h" #endif /* __GNUG__ */ -// #undef ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR #define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR #undef ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION @@ -45,13 +44,11 @@ #define ACE_HAS_GPERF #define ACE_HAS_POSIX_SEM -//#define ACE_HAS_SVR4_TLI #define ACE_HAS_SUNOS4_GETTIMEOFDAY #define ACE_LACKS_STROPTS_H // Wcharness.... -//#define ACE_LACKS_WCHAR_H #define ACE_HAS_WCHAR #define ACE_SIZEOF_WCHAR 4 @@ -61,7 +58,6 @@ #define ACE_LACKS_WCSICMP #define ACE_LACKS_WCSNICMP #define ACE_LACKS_WCSDUP -// #define ACE_LACKS_WCSLEN // Mac lacks the following pthread features #define ACE_LACKS_MUTEXATTR_PSHARED @@ -84,7 +80,6 @@ //Platform/compiler has macros for sig{empty,fill,add,del}set (e.g., SCO and FreeBSD) #define ACE_HAS_SIG_MACROS -//#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS #define ACE_LACKS_GETPGID #define ACE_LACKS_RWLOCK_T |