diff options
Diffstat (limited to 'ACE/ace')
106 files changed, 168 insertions, 4045 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index e276cc6d4c2..06b0289b89a 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -66,11 +66,6 @@ ACE::out_of_handles (int error) error == EINVAL || // Without threads check for EOPNOTSUPP error == EOPNOTSUPP || -#elif defined (sun) - // On sun, we need to check for ENOSR also. - error == ENOSR || - // Without threads check for ENOTSUP - error == ENOTSUP || #elif defined (__FreeBSD__) // On FreeBSD we need to check for EOPNOTSUPP (LinuxThreads) or // ENOSYS (libc_r threads) also. diff --git a/ACE/ace/Array_Base.h b/ACE/ace/Array_Base.h index f16aa65ed69..13b71310509 100644 --- a/ACE/ace/Array_Base.h +++ b/ACE/ace/Array_Base.h @@ -55,8 +55,8 @@ public: typedef value_type const * const_pointer; typedef ptrdiff_t difference_type; typedef ACE_Allocator::size_type size_type; - - ACE_DECLARE_STL_REVERSE_ITERATORS + typedef std::reverse_iterator<iterator> reverse_iterator; + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; /// Dynamically create an uninitialized array. ACE_Array_Base (size_type size = 0, diff --git a/ACE/ace/Array_Map.h b/ACE/ace/Array_Map.h index d7ddf25535c..3e12910f74d 100644 --- a/ACE/ace/Array_Map.h +++ b/ACE/ace/Array_Map.h @@ -33,13 +33,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR -# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator_interface< \ - std::allocator<void>, \ - std::pair<K, V> > -#else -# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> > -#endif +#define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> > /** * @class ACE_Array_Map @@ -92,7 +86,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * -# operator= */ template<typename Key, typename Value, class EqualTo = std::equal_to<Key>, - class Alloc = ACE_ARRAY_MAP_DEFAULT_ALLOCATOR (Key, Value) > + class Alloc = std::allocator<std::pair<Key,Value>>> class ACE_Array_Map { public: @@ -110,7 +104,8 @@ public: typedef value_type const * const_iterator; typedef ptrdiff_t difference_type; typedef size_t size_type; - ACE_DECLARE_STL_REVERSE_ITERATORS + typedef std::reverse_iterator<iterator> reverse_iterator; + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; /// Default Constructor. /** diff --git a/ACE/ace/Atomic_Op.cpp b/ACE/ace/Atomic_Op.cpp index 4b16b311743..52394cd01a3 100644 --- a/ACE/ace/Atomic_Op.cpp +++ b/ACE/ace/Atomic_Op.cpp @@ -7,10 +7,6 @@ #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) -# include "ace/Atomic_Op_Sparc.h" -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ - namespace { #if defined (_MSC_VER) // Disable "no return value" warning, as we will be putting @@ -27,10 +23,6 @@ single_cpu_increment (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), 1); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); @@ -51,10 +43,6 @@ single_cpu_decrement (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), -1); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); @@ -74,10 +62,6 @@ single_cpu_exchange (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (rhs) ); @@ -97,10 +81,6 @@ single_cpu_exchange_add (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("add %0,%1,%2" : "=r" (tmp) : "r" (*value), "r" (rhs) ); @@ -140,10 +120,6 @@ multi_cpu_increment (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), 1); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_NOTSUP_RETURN (-1); @@ -158,10 +134,6 @@ multi_cpu_decrement (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), -1); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_NOTSUP_RETURN (-1); @@ -176,10 +148,6 @@ multi_cpu_exchange (volatile long *value, long rhs) // The XCHG instruction automatically follows LOCK semantics asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_UNUSED_ARG (rhs); @@ -194,10 +162,6 @@ multi_cpu_exchange_add (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined (WIN32) && !defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) # if defined (_MSC_VER) __asm diff --git a/ACE/ace/Atomic_Op.h b/ACE/ace/Atomic_Op.h index 3534c1bef0c..0c505666976 100644 --- a/ACE/ace/Atomic_Op.h +++ b/ACE/ace/Atomic_Op.h @@ -43,8 +43,6 @@ # define ACE_HAS_BUILTIN_ATOMIC_OP # elif defined (ACE_HAS_VXATOMICLIB) # define ACE_HAS_BUILTIN_ATOMIC_OP -# elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && !defined (ACE_HAS_BUILTIN_ATOMIC_OP) -# define ACE_HAS_BUILTIN_ATOMIC_OP # endif /* WIN32 */ #endif /* ACE_HAS_THREADS */ diff --git a/ACE/ace/Atomic_Op.inl b/ACE/ace/Atomic_Op.inl index 517e3ca7d0e..12fb795946e 100644 --- a/ACE/ace/Atomic_Op.inl +++ b/ACE/ace/Atomic_Op.inl @@ -8,10 +8,6 @@ # include <vxAtomicLib.h> #endif -#if defined (ACE_HAS_SOLARIS_ATOMIC_LIB) -# include <atomic.h> -#endif - ACE_BEGIN_VERSIONED_NAMESPACE_DECL #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) @@ -44,8 +40,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ () return ::InterlockedIncrement (const_cast<long *> (&this->value_)); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_)); #else /* WIN32 */ return (*increment_fn_) (&this->value_); #endif /* WIN32 */ @@ -66,8 +60,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- () return ::InterlockedDecrement (const_cast<long *> (&this->value_)); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_)); #else /* WIN32 */ return (*decrement_fn_) (&this->value_); #endif /* WIN32 */ @@ -90,8 +82,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator+= (long rhs) rhs) + rhs; #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return (*exchange_add_fn_) (&this->value_, rhs) + rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -108,8 +98,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (long rhs) -rhs) - rhs; #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), -rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return (*exchange_add_fn_) (&this->value_, -rhs) - rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -160,8 +148,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs) ::InterlockedExchange (const_cast<long *> (&this->value_), rhs); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs); #else /* WIN32 */ (*exchange_fn_) (&this->value_, rhs); #endif /* WIN32 */ @@ -178,8 +164,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= ( ::InterlockedExchange (const_cast<long *> (&this->value_), rhs.value_); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs.value_); #else /* WIN32 */ (*exchange_fn_) (&this->value_, rhs.value_); #endif /* WIN32 */ @@ -195,8 +179,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::exchange (long newval) return ::InterlockedExchange (const_cast<long *> (&this->value_), newval); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), newval); #else /* WIN32 */ return (*exchange_fn_) (&this->value_, newval); #endif /* WIN32 */ @@ -243,8 +225,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator++ () return static_cast<unsigned long> (::InterlockedIncrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_)))); #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (&this->value_); #else /* WIN32 */ return static_cast<unsigned long> ((*increment_fn_) (reinterpret_cast<volatile long *> (&this->value_))); #endif /* WIN32 */ @@ -265,8 +245,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-- () return static_cast<unsigned long> (::InterlockedDecrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_)))); #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (&this->value_); #else /* WIN32 */ return static_cast<unsigned long> ((*decrement_fn_) (reinterpret_cast<volatile long *> (&this->value_))); #endif /* WIN32 */ @@ -289,8 +267,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator+= (unsigned long rhs) rhs)) + rhs; #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs)) + rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -307,8 +283,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-= (unsigned long rhs) -static_cast<long>(rhs))) - rhs; #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, -rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ long l_rhs = static_cast<long> (rhs); return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), -l_rhs)) - rhs; @@ -360,8 +334,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (unsigned long rhs) ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs); #else /* WIN32 */ (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs); #endif /* WIN32 */ @@ -378,8 +350,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= ( ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs.value_); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs.value_); #else /* WIN32 */ (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs.value_); #endif /* WIN32 */ @@ -395,8 +365,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::exchange (unsigned long newval) return ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), newval); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (&this->value_, newval); #else /* WIN32 */ return (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), newval); #endif /* WIN32 */ diff --git a/ACE/ace/Atomic_Op_Sparc.c b/ACE/ace/Atomic_Op_Sparc.c deleted file mode 100644 index 9e59864ae8a..00000000000 --- a/ACE/ace/Atomic_Op_Sparc.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * - * This is a C file for a reason. The Sun C++ compiler does not accept - * inline assembler. - * - * Portions of this code are based on atomic operations found in the - * linux kernel source code. - */ - -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) - -#if defined(__i386) && defined(__SUNPRO_C) -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 4 \n\ -ace_atomic_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - addl 0x00000008(%esp), %eax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - xchg %eax, (%edx) \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - ret \n\ - "); -} - -#elif defined(__x86_64) && defined(__SUNPRO_C) - -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 16 \n\ -ace_atomic_add_long: \n\ - movq %rsi, %rax \n\ - lock; xaddq %rax, (%rdi) \n\ - addq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_long: \n\ - xchgq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_add_long: \n\ - lock; xaddq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); -} - -#elif defined (__sparcv9) - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -#else - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -# endif /* __sparcv9 */ - -#elif !defined (__GNUC__) && !defined (__INTEL_COMPILER) -/* Make compilers stop complaining about an empty translation unit */ -static int shut_up_compiler = 0; -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ diff --git a/ACE/ace/Atomic_Op_Sparc.h b/ACE/ace/Atomic_Op_Sparc.h deleted file mode 100644 index 3c4d883c2af..00000000000 --- a/ACE/ace/Atomic_Op_Sparc.h +++ /dev/null @@ -1,12 +0,0 @@ -/* -*- C++ -*- */ -#ifndef ACE_ATOMIC_OP_SPARC_H -#define ACE_ATOMIC_OP_SPARC_H - -extern "C" -{ - unsigned long ace_atomic_add_long (volatile unsigned long *dest, long rhs); - unsigned long ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs); - unsigned long ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs); -} - -#endif /* ACE_ATOMIC_OP_SPARC_H */ diff --git a/ACE/ace/CDR_Base.h b/ACE/ace/CDR_Base.h index be7828165f5..2e2ce3bdf10 100644 --- a/ACE/ace/CDR_Base.h +++ b/ACE/ace/CDR_Base.h @@ -264,7 +264,7 @@ public: // VxWorks' compiler (gcc 2.96) gets confused by the operator long // double, so we avoid using long double as the NativeImpl. // Linux's x86 long double format (12 or 16 bytes) is incompatible - // with Windows, Solaris, and MacOS X (and probably others) + // with Windows, and MacOS X (and probably others) // long double format (8 or 16 bytes). If you need 32-bit Linux to // inter-operate with 64-bit Linux you will want to define this // macro to 0 so that "long double" is used. Otherwise, do not define diff --git a/ACE/ace/Condition_T.cpp b/ACE/ace/Condition_T.cpp index 3c16a20201f..539bdf1232b 100644 --- a/ACE/ace/Condition_T.cpp +++ b/ACE/ace/Condition_T.cpp @@ -128,10 +128,9 @@ ACE_Condition<MUTEX>::wait (MUTEX &mutex, } } -// Peform an "alertable" timed wait. If the argument ABSTIME == 0 -// then we do a regular cond_wait(), else we do a timed wait for up to -// ABSTIME using the Solaris cond_timedwait() function. - +/// Peform an "alertable" timed wait. If @a abstime == 0 +/// then we do a regular cond_wait(), else we do a timed wait for up to +/// @a abstime template <class MUTEX> int ACE_Condition<MUTEX>::wait (const ACE_Time_Value *abstime) { diff --git a/ACE/ace/Containers_T.cpp b/ACE/ace/Containers_T.cpp index c4ac4b5e2da..1b3b6b144bc 100644 --- a/ACE/ace/Containers_T.cpp +++ b/ACE/ace/Containers_T.cpp @@ -1396,7 +1396,7 @@ ACE_Bounded_Set_Iterator<T>::done () const { ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::done"); - return static_cast<ACE_CAST_CONST size_t> (this->next_) >= + return static_cast<size_t> (this->next_) >= this->s_.cur_size_; } diff --git a/ACE/ace/Containers_T.h b/ACE/ace/Containers_T.h index 8282dca833d..533a48924bb 100644 --- a/ACE/ace/Containers_T.h +++ b/ACE/ace/Containers_T.h @@ -986,18 +986,6 @@ template <class T> class ACE_DLList_Reverse_Iterator; typedef ACE_Double_Linked_List<ACE_DLList_Node> ACE_DLList_Base; -//typedef ACE_Double_Linked_List_Iterator <ACE_DLList_Node> -// ACE_DLList_Iterator_Base; -//typedef ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node> -// ACE_DLList_Reverse_Iterator_Base; -//@@ These two typedefs (inherited from James Hu's original design) -// have been removed because Sun CC 4.2 had problems with it. I guess -// having the DLList_Iterators inheriting from a class which is -// actually a typedef leads to problems. #define'ing rather than -// typedef'ing worked, but as per Carlos's reccomendation, I'm just -// replacing all references to the base classes with their actual -// type. Matt Braun (6/15/99) - /** * @class ACE_DLList * diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp index dc9265414ea..6ac51473285 100644 --- a/ACE/ace/Dev_Poll_Reactor.cpp +++ b/ACE/ace/Dev_Poll_Reactor.cpp @@ -2335,24 +2335,7 @@ ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, { 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 - // remove the existing events, and then add the new ones. - struct pollfd pfd[2]; - - pfd[0].fd = handle; - pfd[0].events = POLLREMOVE; - pfd[0].revents = 0; - pfd[1].fd = (events == POLLREMOVE ? ACE_INVALID_HANDLE : handle); - pfd[1].events = events; - pfd[1].revents = 0; - - // Change the events associated with the given file descriptor. - if (ACE_OS::write (this->poll_fd_, - pfd, - sizeof (pfd)) != sizeof (pfd)) - return -1; -#elif defined (ACE_HAS_EVENT_POLL) +#if defined (ACE_HAS_EVENT_POLL) struct epoll_event epev; ACE_OS::memset (&epev, 0, sizeof (epev)); diff --git a/ACE/ace/High_Res_Timer.h b/ACE/ace/High_Res_Timer.h index 154201bbf1a..6c94f3566d3 100644 --- a/ACE/ace/High_Res_Timer.h +++ b/ACE/ace/High_Res_Timer.h @@ -29,7 +29,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * @brief A high resolution timer class wrapper that encapsulates * OS-specific high-resolution timers, such as those found on - * Solaris, Win32/Pentium, and VxWorks. + * Win32/Pentium, and VxWorks. * * Most of the member functions don't return values. The only * reason that one would fail is if high-resolution time isn't @@ -58,9 +58,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * This is probably not a problem profiling code, but could be * on if the high resolution timer class is used to initiate * actions after a "long" timeout. - * On Solaris, a scale factor of 1000 should be used because its - * high-resolution timer returns nanoseconds. However, on Intel - * platforms, we use RDTSC which returns the number of clock + * On Intel platforms, we use RDTSC which returns the number of clock * ticks since system boot. For a 200MHz cpu, each clock tick * is 1/200 of a microsecond; the global_scale_factor_ should * therefore be 200 or 200000 if it's in unit/millisecond. @@ -75,8 +73,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * you query for your @c timer.stop() value might not be the one * you queried for @c 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. * A RDTSC NOTE: RDTSC is the Intel Pentium read-time stamp counter * and is actualy a 64 bit clock cycle counter, which is increased * with every cycle. It has a low overhead and can be read within @@ -109,7 +105,7 @@ public: * global_scale_factor_. This allows applications to set the scale * factor just once for all High_Res_Timers. Check * High_Res_Timer.cpp for the default global_scale_factors for - * several platforms. For many platforms (e.g., Solaris), the + * several platforms. For many platforms the * global_scale_factor_ is set to 1000 so that <scale_factor> need * not be set. Careful, a <scale_factor> of 0 will cause division * by zero exceptions. diff --git a/ACE/ace/IOStream.h b/ACE/ace/IOStream.h index ca5e831bc9b..38ebe090593 100644 --- a/ACE/ace/IOStream.h +++ b/ACE/ace/IOStream.h @@ -343,16 +343,6 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <ipfx> and <isfx> functions are used. #define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define GET_CODE { \ - if (ipfx (0)) \ - { \ - (*((istream*)this)) >> (v); \ - } \ - isfx (); \ - return *this; \ - } -# else #define GET_CODE { \ if (ipfx (0)) \ { \ @@ -361,7 +351,6 @@ typedef ostream& (*__omanip_)(ostream&); isfx (); \ return *this; \ } -# endif #define GET_PROT(MT,DT,CODE) GET_SIG(MT,DT) CODE #define GET_FUNC(MT,DT) GET_PROT(MT,DT,GET_CODE) @@ -370,16 +359,6 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <opfx> and <osfx> functions are used. #define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define PUT_CODE { \ - if (opfx ()) \ - { \ - (*((ostream *) this)) << (v); \ - } \ - osfx (); \ - return *this; \ - } -# else #define PUT_CODE { \ if (opfx ()) \ { \ @@ -388,7 +367,6 @@ typedef ostream& (*__omanip_)(ostream&); osfx (); \ return *this; \ } -# endif #define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE #define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE) @@ -442,10 +420,6 @@ typedef ostream& (*__omanip_)(ostream&); inline virtual MT& operator<<(__omanip_ func) CODE2 \ inline virtual MT& operator<<(__manip_ func) CODE2 -# if defined (ACE_LACKS_SIGNED_CHAR) - #define GET_FUNC_SET1(MT,CODE,CODE2) GET_FUNC_SET0(MT,CODE,CODE2) - #define PUT_FUNC_SET1(MT,CODE,CODE2) PUT_FUNC_SET0(MT,CODE,CODE2) -# else #define GET_FUNC_SET1(MT,CODE,CODE2) \ GET_PROT(MT,signed char &,CODE) \ GET_PROT(MT,signed char *,CODE) \ @@ -455,7 +429,6 @@ typedef ostream& (*__omanip_)(ostream&); PUT_FUNC(MT,signed char) \ PUT_FUNC(MT,const signed char *) \ 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; } diff --git a/ACE/ace/LOCK_SOCK_Acceptor.h b/ACE/ace/LOCK_SOCK_Acceptor.h index 907e6f3bca1..07d3a46210a 100644 --- a/ACE/ace/LOCK_SOCK_Acceptor.h +++ b/ACE/ace/LOCK_SOCK_Acceptor.h @@ -26,11 +26,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * @brief Specialize ACE_SOCK_Acceptor to lock around <accept>; * - * This class is necessary since some OS platforms (e.g., - * Solaris 2.5) do not allow multiple threads/processes to - * simultaneously call <accept> on the same listen-mode - * port/socket. Thus, we need to protect against multiple - * concurrent accesses by using the appropriate type of lock. + * This class is necessary since some OS platforms do not allow + * multiple threads/processes to simultaneously call @c accept + * on the same listen-mode port/socket. Thus, we need to + * protect against multiple concurrent accesses by using + * the appropriate type of lock. */ template <class ACE_LOCK> class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor diff --git a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp index 17f2d5db1c0..9524a483c64 100644 --- a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp @@ -20,8 +20,6 @@ namespace ACE , Linux_Network_Interface_Monitor ( " %*[^:]: %lu %*u %*u %*u %*u %*u %*u %*u %*u %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("rbytes")) #elif defined (__NetBSD__) || defined (__OpenBSD__) , BSD_Network_Interface_Monitor (ACE_TEXT ("ibytes")) #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h index 0daae6872f2..de3158513d3 100644 --- a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h +++ b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h @@ -25,8 +25,6 @@ #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" #elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -54,8 +52,6 @@ namespace ACE , public Windows_Multi_Instance_Monitor #elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp index 2e63fcc1d7a..b196f2f01f5 100644 --- a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp @@ -20,8 +20,6 @@ namespace ACE , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %*u %*u %*u %*u %*u %*u %*u %lu %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("obytes")) #elif defined (__FreeBSD__) || defined (__Lynx__) , FreeBSD_Network_Interface_Monitor (ACE_TEXT ("obytes")) #elif defined (__NetBSD__) || defined (__OpenBSD__) diff --git a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h index dbe3f8fe008..8672d6749bf 100644 --- a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h +++ b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h @@ -25,8 +25,6 @@ #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" #elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -54,8 +52,6 @@ namespace ACE , public Windows_Multi_Instance_Monitor #elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp b/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp index 60ca87f76c4..af3bfe97163 100644 --- a/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp +++ b/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp @@ -2,10 +2,6 @@ #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) -#if defined (ACE_HAS_KSTAT) -#include <sys/sysinfo.h> -#endif - #if defined (ACE_LINUX) #include "ace/OS_NS_stdio.h" #endif @@ -27,7 +23,7 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Monitor (ACE_TEXT("\\Processor(_Total)\\% Processor Time")) #endif -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) +#if defined (ACE_LINUX) , user_ (0) , wait_ (0) , kernel_ (0) @@ -37,10 +33,6 @@ namespace ACE #endif #if defined (ACE_LINUX) , file_ptr_ (0) -#elif defined (ACE_HAS_KSTAT) - , kstats_ (0) - , kstat_ (0) - , kstat_id_ (0) #endif { this->init (); @@ -58,7 +50,7 @@ namespace ACE this->access_kstats (&this->idle_); #endif -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) +#if defined (ACE_LINUX) double delta_idle = this->idle_ - this->prev_idle_; double total = this->user_ + this->wait_ + this->kernel_ + this->idle_; @@ -109,12 +101,6 @@ namespace ACE this->prev_total_ = this->user_ + this->wait_ + this->kernel_ + this->prev_idle_; -#elif defined (ACE_HAS_KSTAT) - /// Stored similarly to Linux, in a system file. - this->access_kstats (&this->prev_idle_); - - this->prev_total_ = - this->user_ + this->wait_ + this->kernel_ + this->prev_idle_; #endif } @@ -160,93 +146,6 @@ namespace ACE ACE_OS::fclose (this->file_ptr_); } #endif - -#if defined (ACE_HAS_KSTAT) - void - CPU_Load_Monitor::access_kstats (unsigned long *which_idle) - { - this->kstats_ = kstat_open (); - - if (this->kstats_ == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("opening kstats file failed\n"))); - return; - } - - this->kstat_id_ = this->kstats_->kc_chain_id; - - while (true) - { - this->kernel_ = 0UL; - this->wait_ = 0UL; - this->user_ = 0UL; - (*which_idle) = 0UL; - - /// Unlike Linux's "/proc/stat", there is no entry for total CPU - /// stats, so we have to sum them manually. - for (this->kstat_ = this->kstats_->kc_chain; - this->kstat_ != 0; - this->kstat_ = this->kstat_->ks_next) - { - int result = ACE_OS::strncmp (this->kstat_->ks_name, - "cpu_stat", - ACE_OS::strlen ("cpu_stat")); - - if (result == 0) - { - /// Because the kstat chain can change dynamically, - /// watch the chain ID and restart the walk if the ID - /// differs from what we saw during the walk. The restart - /// is done by breaking from the cycle with kstat_ not 0. - - kid_t kstat_id = kstat_read (this->kstats_, this->kstat_, 0); - - if (kstat_id != this->kstat_id_) - { - break; - } - - cpu_stat_t &kstat_cpu = - *((cpu_stat_t *) this->kstat_->ks_data); - - this->kernel_ += kstat_cpu.cpu_sysinfo.cpu[CPU_KERNEL]; - this->wait_ += kstat_cpu.cpu_sysinfo.cpu[CPU_WAIT]; - this->user_ += kstat_cpu.cpu_sysinfo.cpu[CPU_USER]; - (*which_idle) += kstat_cpu.cpu_sysinfo.cpu[CPU_IDLE]; - } - } - - if (this->kstat_ != 0) - { - /// The ID changed underneath us, so get the new one and - /// start again. - this->kstat_id_ = kstat_chain_update (this->kstats_); - - if (! this->kstat_id_ > 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("kstat chain update ") - ACE_TEXT ("returned null id\n"))); - return; - } - } - else - { - /// Clean run, exit the WHILE loop. - break; - } - } - - int status = kstat_close (this->kstats_); - - if (status != 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("closing kstats file failed\n"))); - } - } -#endif } } diff --git a/ACE/ace/Monitor_Control/CPU_Load_Monitor.h b/ACE/ace/Monitor_Control/CPU_Load_Monitor.h index 037cb5d19b2..f286478039b 100644 --- a/ACE/ace/Monitor_Control/CPU_Load_Monitor.h +++ b/ACE/ace/Monitor_Control/CPU_Load_Monitor.h @@ -23,8 +23,6 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/os_include/os_kstat.h" #endif #include "ace/Monitor_Control/Monitor_Control_export.h" @@ -67,15 +65,11 @@ namespace ACE void access_proc_stat (unsigned long *which_idle); #endif -#if defined (ACE_HAS_KSTAT) - void access_kstats (unsigned long *which_idle); -#endif - private: static const char* default_name_; - /// Common to Linux and Solaris implementations. -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) + /// Linux implementation +#if defined (ACE_LINUX) unsigned long user_; unsigned long wait_; unsigned long kernel_; @@ -86,10 +80,6 @@ namespace ACE #if defined (ACE_LINUX) FILE *file_ptr_; char buf_[1024]; -#elif defined (ACE_HAS_KSTAT) - kstat_ctl_t *kstats_; - kstat_t *kstat_; - kid_t kstat_id_; #endif }; } diff --git a/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp b/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp index 49593fee95c..ab288a05dfa 100644 --- a/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp @@ -1,7 +1,3 @@ -#if defined (ACE_HAS_KSTAT) -#include <sys/sysinfo.h> -#endif - #include "ace/Monitor_Control/Memory_Usage_Monitor.h" #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) @@ -41,15 +37,6 @@ namespace ACE double percent_mem_usage = used_ram / this->sysinfo_.totalram * 100.0; this->receive (percent_mem_usage); -#elif defined (ACE_HAS_KSTAT) - unsigned long page_size = sysconf (_SC_PAGE_SIZE); - unsigned long total = sysconf (_SC_PHYS_PAGES) * page_size; - unsigned long free = sysconf (_SC_AVPHYS_PAGES) * page_size; - - double used = total - free; - double percent_mem_usage = used / total * 100.0; - - this->receive (percent_mem_usage); #endif } diff --git a/ACE/ace/Monitor_Control/Monitor_Control.mpc b/ACE/ace/Monitor_Control/Monitor_Control.mpc index a510ac2da38..5073b019163 100644 --- a/ACE/ace/Monitor_Control/Monitor_Control.mpc +++ b/ACE/ace/Monitor_Control/Monitor_Control.mpc @@ -20,7 +20,6 @@ project(Monitor_Control) : acelib, ace_etcl_parser, ace_output, install { Num_Threads_Monitor.cpp Packets_Received_Monitor.cpp Packets_Sent_Monitor.cpp - Solaris_Network_Interface_Monitor.cpp Windows_Monitor.cpp Windows_Multi_Instance_Monitor.cpp } diff --git a/ACE/ace/Monitor_Control/Num_Threads_Monitor.h b/ACE/ace/Monitor_Control/Num_Threads_Monitor.h index 422a71c79ea..7a20d2d0b78 100644 --- a/ACE/ace/Monitor_Control/Num_Threads_Monitor.h +++ b/ACE/ace/Monitor_Control/Num_Threads_Monitor.h @@ -23,14 +23,6 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -/// There is apparently no way to query the number of threads on the -/// Solaris platform. The only benchmark I've seen had to put hooks -/// in the thread creation functions to keep track of the highest -/// thread ID, then check all the IDs less than that to see if the -/// threads still exist. Since we don't have that option in this -/// framework, which is to be used by existing applications, this -/// particular OS monitor is left unimplemented on Solaris. #endif #include "ace/Monitor_Control/Monitor_Control_export.h" diff --git a/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp b/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp index b7fb58f971d..4d222b86514 100644 --- a/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp @@ -20,8 +20,6 @@ namespace ACE , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %lu %*u %*u %*u %*u %*u %*u %*u %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("ipackets")) #elif defined (__FreeBSD__) || defined (__Lynx__) , FreeBSD_Network_Interface_Monitor (ACE_TEXT ("ipackets")) #elif defined (__NetBSD__) || defined (__OpenBSD__) diff --git a/ACE/ace/Monitor_Control/Packets_Received_Monitor.h b/ACE/ace/Monitor_Control/Packets_Received_Monitor.h index 7d163b0401a..d0338dfde6b 100644 --- a/ACE/ace/Monitor_Control/Packets_Received_Monitor.h +++ b/ACE/ace/Monitor_Control/Packets_Received_Monitor.h @@ -25,8 +25,6 @@ #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" #elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -54,8 +52,6 @@ namespace ACE , public Windows_Multi_Instance_Monitor #elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp index 1319daadc6d..5c3046c0e3e 100644 --- a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp @@ -20,8 +20,6 @@ namespace ACE , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %*u %*u %*u %*u %*u %*u %*u %*u %lu") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("opackets")) #elif defined (__NetBSD__) || defined (__OpenBSD__) , BSD_Network_Interface_Monitor (ACE_TEXT ("opackets")) #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h index b9056eda83b..85de0ca1d63 100644 --- a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h +++ b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h @@ -25,8 +25,6 @@ #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" #elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -54,8 +52,6 @@ namespace ACE , public Windows_Multi_Instance_Monitor #elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp b/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp deleted file mode 100644 index a3e09a8afa2..00000000000 --- a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp +++ /dev/null @@ -1,221 +0,0 @@ -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" - -#if defined (ACE_HAS_KSTAT) - -#include "ace/Log_Category.h" -#include "ace/OS_NS_stdio.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - namespace Monitor_Control - { - Solaris_Network_Interface_Monitor::Solaris_Network_Interface_Monitor ( - const ACE_TCHAR *lookup_str) - : value_ (0UL), - start_ (0UL), - lookup_str_ (lookup_str) - { - this->init (); - } - - void - Solaris_Network_Interface_Monitor::update_i () - { - this->access_kstats (this->value_); - this->value_ -= this->start_; - } - - void - Solaris_Network_Interface_Monitor::clear_impl () - { - this->init (); - } - - void - Solaris_Network_Interface_Monitor::init () - { - unsigned long i; - - for (i = 0UL; i < MAX_LO_INTERFACES; ++i) - { - this->value_array_lo_[i] = 0UL; - } - - for (i = 0UL; i < MAX_HME_INTERFACES; ++i) - { - this->value_array_hme_[i] = 0UL; - } - - this->access_kstats (this->start_); - } - - void - Solaris_Network_Interface_Monitor::access_kstats ( - ACE_UINT64 &which_member) - { - this->kstats_ = kstat_open (); - - if (this->kstats_ == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("opening kstats file failed\n"))); - return; - } - - this->kstat_id_ = this->kstats_->kc_chain_id; - int status = 0; - - while (true) - { - /// We have to sum the network interfaces manually. - for (this->kstat_ = this->kstats_->kc_chain; - this->kstat_ != 0; - this->kstat_ = this->kstat_->ks_next) - { - if (ACE_OS::strcmp (this->kstat_->ks_class, "net") != 0) - { - continue; - } - - unsigned long ks_instance = this->kstat_->ks_instance; - - if (ACE_OS::strcmp (this->kstat_->ks_module, "lo") == 0) - { - /// Interfaces 'lo' have only packet counters. - if (this->lookup_str_ == ACE_TEXT ("obytes") - || this->lookup_str_ == ACE_TEXT ("rbytes")) - { - continue; - } - - status = this->check_ks_module (ks_instance, - MAX_LO_INTERFACES, - "MAX_LO_INTERFACES", - this->value_array_lo_, - which_member); - - if (status == -1) - { - /// Unrecoverable error, diagnostic already output. - (void) kstat_close (this->kstats_); - return; - } - else if (status == 1) - { - /// The kstat_id changed underneath us, start over. - break; - } - } - else if (ACE_OS::strcmp (this->kstat_->ks_module, "hme") == 0 - || ACE_OS::strcmp (this->kstat_->ks_module, "bge") == 0) - { - status = this->check_ks_module (ks_instance, - MAX_HME_INTERFACES, - "MAX_HME_INTERFACES", - this->value_array_hme_, - which_member); - - if (status == -1) - { - /// Unrecoverable error, diagnostic already output. - (void) kstat_close (this->kstats_); - return; - } - else if (status == 1) - { - /// The kstat_id changed underneath us, start over. - break; - } - } - } - - if (this->kstat_) - { - this->kstat_id_ = kstat_chain_update (this->kstats_); - - if (! this->kstat_id_ > 0) - { - ACELIB_ERROR ((LM_ERROR, "kstat is is not > 0.\n")); - break; - } - } - else - { - break; - } - } - - status = kstat_close (this->kstats_); - - if (status != 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("closing kstats file failed\n"))); - } - } - - int - Solaris_Network_Interface_Monitor::check_ks_module ( - const unsigned long ks_instance, - const unsigned long which_max, - const char *max_str, - ACE_UINT64 *value_array, - ACE_UINT64 &which_member) - { - if (! (ks_instance < which_max)) - { - ACELIB_ERROR_RETURN ((LM_ERROR, - "%s exceeded.\n", - max_str), - -1); - } - - /// Because the kstat chain can change dynamically, - /// watch the chain ID and restart the walk if the ID - /// differs from what we saw during the walk. The restart - /// is done by breaking from the cycle with kstat_ not 0. - - kid_t kstat_id = - kstat_read (this->kstats_, this->kstat_, 0); - - if (kstat_id != this->kstat_id_) - { - /// This return value restarts the walk as described above. - return 1; - } - - kstat_named_t *value = - (kstat_named_t *) kstat_data_lookup ( - this->kstat_, - ACE_TEXT_ALWAYS_CHAR (this->lookup_str_.rep ())); - - if (value == 0) - { - /// Just return and let the calling FOR loop advance. - return 0; - } - - if (value->data_type != KSTAT_DATA_UINT32) - { - ACELIB_ERROR_RETURN ((LM_ERROR, - "Wrong data type.\n"), - -1); - } - - /// Guard against overflow. - value_array[ks_instance] += - value->value.ui32 - - static_cast<ACE_UINT32> (value_array[ks_instance]); - - which_member += value_array[ks_instance]; - - return 0; - } - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* defined (ACE_HAS_KSTAT) */ diff --git a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h b/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h deleted file mode 100644 index 15dbc9c50e1..00000000000 --- a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Solaris_Network_Interface_Monitor.h - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - -#ifndef SOLARIS_NETWORK_INTERFACE_MONITOR_H -#define SOLARIS_NETWORK_INTERFACE_MONITOR_H - -#include /**/ "ace/pre.h" - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Monitor_Control/Monitor_Control_export.h" - -#if defined (ACE_HAS_KSTAT) - -#include "ace/os_include/os_kstat.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - namespace Monitor_Control - { - /** - * @class Solaris_Network_Interface_Monitor - * - * @brief Mixin class for network interface monitors compiled on - * Solaris machines. - */ - class MONITOR_CONTROL_Export Solaris_Network_Interface_Monitor - { - protected: - /// The kstat interface can access a wealth of - /// network information about the system. To get the specific - /// value we want to monitor, we just vary the lookup string. - Solaris_Network_Interface_Monitor (const ACE_TCHAR *lookup_str); - - /// Platform-specific implementation. - void update_i (); - - /// Platform-specific reset. - void clear_impl (); - - protected: - ACE_UINT64 value_; - - private: - /// Common code. - - void init (); - void access_kstats (ACE_UINT64 &which_member); - int check_ks_module (const unsigned long ks_instance, - const unsigned long which_max, - const char *max_str, - ACE_UINT64 *value_array, - ACE_UINT64 &which_member); - - - private: - static const unsigned long MAX_LO_INTERFACES = 5UL; - static const unsigned long MAX_HME_INTERFACES = 10UL; - ACE_UINT64 value_array_lo_[MAX_LO_INTERFACES]; - ACE_UINT64 value_array_hme_[MAX_HME_INTERFACES]; - ACE_UINT64 start_; - ACE_TString lookup_str_; - kstat_ctl_t *kstats_; - kstat_t *kstat_; - kid_t kstat_id_; - }; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* defined (ACE_HAS_KSTAT) */ - -#include /**/ "ace/post.h" - -#endif // SOLARIS_NETWORK_INTERFACE_MONITOR_H diff --git a/ACE/ace/Mutex.h b/ACE/ace/Mutex.h index ba784f63b7f..16950c71872 100644 --- a/ACE/ace/Mutex.h +++ b/ACE/ace/Mutex.h @@ -161,7 +161,7 @@ public: # define ACE_MUTEX_PROCESS_LOCK_IS_SEMA ACE_sema_t process_sema_; typedef ACE_sema_t Process_Lock; -#elif defined ACE_HAS_PTHREADS || defined ACE_HAS_STHREADS +#elif defined ACE_HAS_PTHREADS # define ACE_MUTEX_USE_PROCESS_LOCK # define ACE_MUTEX_PROCESS_LOCK_IS_MUTEX typedef ACE_mutex_t Process_Lock; diff --git a/ACE/ace/OS_Errno.cpp b/ACE/ace/OS_Errno.cpp index 1c2f75e490a..8c082487b73 100644 --- a/ACE/ace/OS_Errno.cpp +++ b/ACE/ace/OS_Errno.cpp @@ -1,11 +1,9 @@ // -*- C++ -*- #include "ace/OS_Errno.h" -// Inlining this class on debug builds with gcc on Solaris can cause -// deadlocks during static initialization. On non debug builds it -// causes compilation errors. -#if !defined (ACE_HAS_INLINED_OSCALLS) || \ - (defined (__GNUG__) && defined (__sun__)) +// Inlining this class on debug builds with gcc deadlocks during static +// initialization. On non debug builds it causes compilation errors. +#if !defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE # endif /* ACE_INLINE */ diff --git a/ACE/ace/OS_Errno.h b/ACE/ace/OS_Errno.h index 9ebdc03b5c7..3f2555b3fb5 100644 --- a/ACE/ace/OS_Errno.h +++ b/ACE/ace/OS_Errno.h @@ -76,11 +76,10 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -// Inlining this class on debug builds with gcc on Solaris can cause +// Inlining this class on debug builds with can cause // deadlocks during static initialization. On non debug builds it // causes compilation errors. -#if defined (ACE_HAS_INLINED_OSCALLS) && \ - (!defined (__GNUG__) || !defined (__sun__)) +#if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE # endif /* ACE_INLINE */ diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index 58dd6b343fb..d4e3c82b253 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -1877,14 +1877,6 @@ ACE_OS::mutex_init (ACE_mutex_t *m, ::pthread_mutexattr_destroy (&l_attributes); return result; -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (sa); - ACE_UNUSED_ARG (lock_type); - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_init (m, lock_scope, attributes), - result), - int); # elif defined (ACE_HAS_WTHREADS) m->type_ = lock_scope; @@ -1949,9 +1941,6 @@ ACE_OS::mutex_destroy (ACE_mutex_t *m) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_destroy (m), result), int); # endif /* ACE_LACKS_PTHREAD_MUTEX_DESTROY */ -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_destroy (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2033,9 +2022,6 @@ ACE_OS::mutex_lock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_lock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_lock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2207,9 +2193,6 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_trylock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_trylock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2308,9 +2291,6 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_unlock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_unlock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -3010,72 +2990,15 @@ ACE_OS::event_timedwait (ACE_event_t *event, int ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params) { -#if defined (ACE_HAS_STHREADS) || defined (sun) - // Get the class TS and RT class IDs. - ACE_id_t rt_id; - ACE_id_t ts_id; - if (ACE_OS::scheduling_class ("RT", rt_id) == -1 - || ACE_OS::scheduling_class ("TS", ts_id) == -1) - return -1; - - // Get this LWP's scheduling parameters. - pcparms_t pcparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcparms, 0, sizeof pcparms); - pcparms.pc_cid = PC_CLNULL; - - if (ACE_OS::priority_control (P_LWPID, - P_MYID, - PC_GETPARMS, - (char *) &pcparms) == -1) - return -1; - else if (pcparms.pc_cid == rt_id) - { - // RT class. - rtparms_t rtparms; - ACE_OS::memcpy (&rtparms, pcparms.pc_clparms, sizeof rtparms); - - sched_params.policy (ACE_SCHED_FIFO); - sched_params.priority (rtparms.rt_pri); - sched_params.scope (ACE_SCOPE_THREAD); - ACE_Time_Value quantum (rtparms.rt_tqsecs, - rtparms.rt_tqnsecs == RT_TQINF - ? 0 : rtparms.rt_tqnsecs * 1000); - sched_params.quantum (quantum); - return 0; - } - else if (pcparms.pc_cid == ts_id) - { - /* TS class */ - tsparms_t tsparms; - ACE_OS::memcpy (&tsparms, pcparms.pc_clparms, sizeof tsparms); - - sched_params.policy (ACE_SCHED_OTHER); - sched_params.priority (tsparms.ts_upri); - sched_params.scope (ACE_SCOPE_THREAD); - return 0; - } - else - return -1; - -#else /* ! ACE_HAS_STHREADS && ! sun */ ACE_UNUSED_ARG (sched_params); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_STHREADS && ! sun */ } int ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params) { -#if defined (ACE_HAS_STHREADS) || defined (sun) - ACE_Sched_Params lwp_params (sched_params); - lwp_params.scope (ACE_SCOPE_LWP); - return ACE_OS::sched_params (lwp_params); -#else /* ! ACE_HAS_STHREADS && ! sun */ ACE_UNUSED_ARG (sched_params); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_STHREADS && ! sun */ } #if defined ACE_HAS_THREADS && defined ACE_LACKS_RWLOCK_T @@ -3205,9 +3128,7 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, ACE_id_t id) { ACE_OS_TRACE ("ACE_OS::sched_params"); -#if defined (ACE_HAS_STHREADS) - return ACE_OS::set_scheduling_params (sched_params, id); -#elif defined (ACE_HAS_PTHREADS) && \ +#if defined (ACE_HAS_PTHREADS) && \ (!defined (ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) if (sched_params.quantum () != ACE_Time_Value::zero) @@ -3248,12 +3169,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, result), int); } -# if defined (sun) - // We need to be able to set LWP priorities on Suns, even without - // ACE_HAS_STHREADS, to obtain preemption. - else if (sched_params.scope () == ACE_SCOPE_LWP) - return ACE_OS::set_scheduling_params (sched_params, id); -# endif /* sun */ else // sched_params.scope () == ACE_SCOPE_LWP, which isn't POSIX { errno = EINVAL; @@ -3366,132 +3281,19 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, ACE_UNUSED_ARG (sched_params); ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_STHREADS */ +#endif /* ACE_HAS_PTHREADS */ } int -ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id) +ACE_OS::scheduling_class (const char */*class_name*/, ACE_id_t &/*id*/) { -#if defined (ACE_HAS_PRIOCNTL) - // Get the priority class ID. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - - ACE_OS::strcpy (pcinfo.pc_clname, class_name); - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - { - return -1; - } - else - { - id = pcinfo.pc_cid; - return 0; - } -#else /* ! ACE_HAS_PRIOCNTL */ - ACE_UNUSED_ARG (class_name); - ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL */ } int -ACE_OS::set_scheduling_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +ACE_OS::set_scheduling_params (const ACE_Sched_Params &/*sched_params*/, ACE_id_t /*id*/) { -#if defined (ACE_HAS_PRIOCNTL) - // Set priority class, priority, and quantum of this LWP or process as - // specified in sched_params. - - // Get the priority class ID. - ACE_id_t class_id; - if (ACE_OS::scheduling_class (sched_params.policy() == ACE_SCHED_OTHER ? - "TS" : - "RT", class_id) == -1) - { - return -1; - } - - pcparms_t pcparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcparms, 0, sizeof pcparms); - - pcparms.pc_cid = class_id; - - if (sched_params.policy () == ACE_SCHED_OTHER && - sched_params.quantum () == ACE_Time_Value::zero) - // SunOS doesn't support non-zero quantums in time-sharing class: use - // real-time class instead. - { - tsparms_t tsparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&tsparms, 0, sizeof tsparms); - - // Don't change ts_uprilim (user priority limit) - tsparms.ts_uprilim = TS_NOCHANGE; - tsparms.ts_upri = sched_params.priority (); - - // Package up the TS class ID and parameters for the - // priority_control () call. - ACE_OS::memcpy (pcparms.pc_clparms, &tsparms, sizeof tsparms); - } - else if (sched_params.policy () == ACE_SCHED_FIFO || - (sched_params.policy () == ACE_SCHED_RR && - sched_params.quantum () != ACE_Time_Value::zero)) - // must have non-zero quantum for RR, to make it meaningful - // A zero quantum with FIFO has special significance: it actually - // means infinite time quantum, i.e., run-to-completion. - { - rtparms_t rtparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&rtparms, 0, sizeof rtparms); - - rtparms.rt_pri = sched_params.priority (); - - if (sched_params.quantum () == ACE_Time_Value::zero) - { - // rtparms.rt_tqsecs is ignored with RT_TQINF - rtparms.rt_tqnsecs = RT_TQINF; - } - else - { - rtparms.rt_tqsecs = (ulong) sched_params.quantum ().sec (); - rtparms.rt_tqnsecs = sched_params.quantum ().usec () * 1000; - } - - // Package up the RT class ID and parameters for the - // priority_control () call. - ACE_OS::memcpy (pcparms.pc_clparms, &rtparms, sizeof rtparms); - } - else - { - errno = EINVAL; - return -1; - } - - if (ACE_OS::priority_control ((idtype_t) (sched_params.scope () == ACE_SCOPE_THREAD - ? ACE_SCOPE_PROCESS - : sched_params.scope ()), - id, - PC_SETPARMS, - (char *) &pcparms) < 0) - { - return ACE_OS::last_error (); - } - - return 0; -#else /* ! ACE_HAS_PRIOCNTL */ - ACE_UNUSED_ARG (sched_params); - ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL */ } int @@ -3730,7 +3532,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # if defined (PTHREAD_MAX_PRIORITY) && !defined(ACE_HAS_PTHREADS) /* For MIT pthreads... */ sparam.prio = ACE_MIN (priority, PTHREAD_MAX_PRIORITY); -# elif defined(ACE_HAS_PTHREADS) && !defined (ACE_HAS_STHREADS) +# elif defined(ACE_HAS_PTHREADS) // The following code forces priority into range. if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO)) sparam.sched_priority = @@ -3752,20 +3554,12 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # endif /* PTHREAD_MAX_PRIORITY */ { -# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER) - // SunOS, through 5.6, POSIX only allows priorities > 0 to - // ::pthread_attr_setschedparam. If a priority of 0 was - // requested, set the thread priority after creating it, below. - if (priority > 0) -# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */ + (void) ACE_ADAPT_RETVAL(::pthread_attr_setschedparam (&attr, &sparam), + result); + if (result != 0) { - (void) ACE_ADAPT_RETVAL(::pthread_attr_setschedparam (&attr, &sparam), - result); - if (result != 0) - { - ::pthread_attr_destroy (&attr); - return -1; - } + ::pthread_attr_destroy (&attr); + return -1; } } } @@ -3833,7 +3627,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, } # endif /* !ACE_HAS_PTHREAD_ATTR_SETCREATESUSPEND_NP */ -# if ! defined(ACE_LACKS_THR_CONCURRENCY_FUNCS) if (ACE_BIT_ENABLED (flags, THR_NEW_LWP)) { // Increment the number of LWPs by one to emulate the @@ -3860,7 +3653,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, return -1; } } -# endif /* ! ACE_LACKS_THR_CONCURRENCY_FUNCS */ } ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_create (thr_id, @@ -3877,75 +3669,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, if (result != -1) *thr_handle = *thr_id; -# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER) - // SunOS prior to 5.7: - - // If the priority is 0, then we might have to set it now because we - // couldn't set it with ::pthread_attr_setschedparam, as noted - // above. This doesn't provide strictly correct behavior, because - // the thread was created (above) with the priority of its parent. - // (That applies regardless of the inherit_sched attribute: if it - // was PTHREAD_INHERIT_SCHED, then it certainly inherited its - // parent's priority. If it was PTHREAD_EXPLICIT_SCHED, then "attr" - // was initialized by the SunOS ::pthread_attr_init () to contain - // NULL for the priority, which indicated to SunOS ::pthread_create - // () to inherit the parent priority.) - if (priority == 0) - { - // Check the priority of this thread, which is the parent - // of the newly created thread. If it is 0, then the - // newly created thread will have inherited the priority - // of 0, so there's no need to explicitly set it. - struct sched_param sparam; - int policy = 0; - ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_getschedparam (thr_self (), - &policy, - &sparam), - result), int, - result); - - // The only policy supported by by SunOS, thru version 5.6, - // is SCHED_OTHER, so that's hard-coded here. - policy = ACE_SCHED_OTHER; - - if (sparam.sched_priority != 0) - { - ACE_OS::memset ((void *) &sparam, 0, sizeof sparam); - // The memset to 0 sets the priority to 0, so we don't need - // to explicitly set sparam.sched_priority. - - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (*thr_id, - policy, - &sparam), - result), - int); - } - } - -# if defined (ACE_NEEDS_LWP_PRIO_SET) -# if 0 - // It would be useful if we could make this work. But, it requires - // a mechanism for determining the ID of an LWP to which another - // thread is bound. Is there a way to do that? Instead, just rely - // on the code in ACE_Thread_Adapter::invoke () to set the LWP - // priority. - - // If the thread is bound, then set the priority on its LWP. - if (ACE_BIT_ENABLED (flags, THR_BOUND)) - { - ACE_Sched_Params sched_params (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO) || - ACE_BIT_ENABLED (flags, THR_SCHED_RR) ? - ACE_SCHED_FIFO : - ACE_SCHED_OTHER, - priority); - result = ACE_OS::lwp_setparams (sched_params, - /* ? How do we find the ID of the LWP - to which *thr_id is bound? */); - } -# endif /* 0 */ -# endif /* ACE_NEEDS_LWP_PRIO_SET */ - -# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */ auto_thread_args.release (); // *** Set pthread name (second try) @@ -3964,51 +3687,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # endif /* !ACE_HAS_PTHREAD_ATTR_SETNAME */ return result; -# elif defined (ACE_HAS_STHREADS) - int result; - int start_suspended = ACE_BIT_ENABLED (flags, THR_SUSPENDED); - - if (priority != ACE_DEFAULT_THREAD_PRIORITY) - // If we need to set the priority, then we need to start the - // thread in a suspended mode. - ACE_SET_BITS (flags, THR_SUSPENDED); - - ACE_OSCALL (ACE_ADAPT_RETVAL (::thr_create (stack, stacksize, - thread_args->entry_point (), - thread_args, - flags, thr_id), result), - int, result); - - if (result != -1) - { - // With SunOS threads, ACE_thread_t and ACE_hthread_t are the same. - *thr_handle = *thr_id; - - if (priority != ACE_DEFAULT_THREAD_PRIORITY) - { - // Set the priority of the new thread and then let it - // continue, but only if the user didn't start it suspended - // in the first place! - result = ACE_OS::thr_setprio (*thr_id, priority); - if (result != 0) - { - errno = result; - return -1; - } - - if (start_suspended == 0) - { - result = ACE_OS::thr_continue (*thr_id); - if (result != 0) - { - errno = result; - return -1; - } - } - } - } - auto_thread_args.release (); - return result; # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (thr_name); ACE_UNUSED_ARG (stack); @@ -4166,7 +3844,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, return 0; } -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (func); ACE_UNUSED_ARG (args); @@ -4188,8 +3866,6 @@ ACE_OS::thr_exit (ACE_THR_FUNC_RETURN status) #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_EXIT) ::pthread_exit (status); -# elif defined (ACE_HAS_STHREADS) - ::thr_exit (status); # elif defined (ACE_HAS_WTHREADS) // Can't call it here because on NT, the thread is exited // directly by ACE_Thread_Adapter::invoke (). @@ -4465,11 +4141,6 @@ ACE_OS::thr_keycreate_native (ACE_OS_thread_key_t *key, ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_key_create (key, dest), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_keycreate (key, dest), - result), - int); # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (dest); *key = ::TlsAlloc (); @@ -4477,7 +4148,7 @@ ACE_OS::thr_keycreate_native (ACE_OS_thread_key_t *key, if (*key == ACE_SYSCALL_FAILED) ACE_FAIL_RETURN (-1); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (dest); @@ -4571,9 +4242,6 @@ ACE_OS::thr_keyfree_native (ACE_OS_thread_key_t key) # endif /* ACE_LACKS_PTHREAD_KEY_DELETE */ # elif defined (ACE_HAS_THR_KEYDELETE) return ::thr_keydelete (key); -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (key); - ACE_NOTSUP_RETURN (-1); # elif defined (ACE_HAS_WTHREADS) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::TlsFree (key), ace_result_), int, -1); # else @@ -4630,36 +4298,7 @@ ACE_OS::thr_setprio (const ACE_Sched_Priority prio) ACE_hthread_t my_thread_id; ACE_OS::thr_self (my_thread_id); - int const status = ACE_OS::thr_setprio (my_thread_id, prio); - -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // If the thread is in the RT class, then set the priority on its - // LWP. (Instead of doing this if the thread is in the RT class, it - // should be done for all bound threads. But, there doesn't appear - // to be an easy way to determine if the thread is bound.) - - if (status == 0) - { - // Find what scheduling class the thread's LWP is in. - ACE_Sched_Params sched_params (ACE_SCHED_OTHER, 0); - if (ACE_OS::lwp_getparams (sched_params) == -1) - { - return -1; - } - else if (sched_params.policy () == ACE_SCHED_FIFO || - sched_params.policy () == ACE_SCHED_RR) - { - // This thread's LWP is in the RT class, so we need to set - // its priority. - sched_params.priority (prio); - return ACE_OS::lwp_setparams (sched_params); - } - // else this is not an RT thread. Nothing more needs to be - // done. - } -#endif /* ACE_NEEDS_LWP_PRIO_SET */ - - return status; + return ACE_OS::thr_setprio (my_thread_id, prio); } # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) @@ -4673,17 +4312,14 @@ ACE_OS::thr_setspecific_native (ACE_OS_thread_key_t key, void *data) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_setspecific (key, data), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), result), int); # elif defined (ACE_HAS_WTHREADS) ::TlsSetValue (key, data); return 0; -# else /* ACE_HAS_STHREADS */ +# else /* ACE_HAS_PTHREADS */ ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (data); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (data); diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h index 763ee8cdd10..18d38698efa 100644 --- a/ACE/ace/OS_NS_Thread.h +++ b/ACE/ace/OS_NS_Thread.h @@ -45,18 +45,6 @@ # endif # define ACE_EXPORT_MACRO ACE_Export -# if defined (ACE_HAS_PRIOCNTL) - // Need to #include thread.h before #defining THR_BOUND, etc., - // when building without threads on SunOS 5.x. -# if defined (sun) -# include /**/ <thread.h> -# endif /* sun */ - - // Need to #include these before #defining USYNC_PROCESS on SunOS 5.x. -# include /**/ <sys/rtpriocntl.h> -# include /**/ <sys/tspriocntl.h> -# endif /* ACE_HAS_PRIOCNTL */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL # if defined (ACE_WIN32) @@ -88,17 +76,9 @@ extern "C" { # if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) -# include /**/ <synch.h> -# include /**/ <thread.h> -# define ACE_SCOPE_PROCESS P_PID -# define ACE_SCOPE_LWP P_LWPID -# define ACE_SCOPE_THREAD (ACE_SCOPE_LWP + 1) -# else -# define ACE_SCOPE_PROCESS 0 -# define ACE_SCOPE_LWP 1 -# define ACE_SCOPE_THREAD 2 -# endif /* ACE_HAS_STHREADS */ +# define ACE_SCOPE_PROCESS 0 +# define ACE_SCOPE_LWP 1 +# define ACE_SCOPE_THREAD 2 # if !defined (ACE_HAS_PTHREADS) # define ACE_SCHED_OTHER 0 @@ -106,57 +86,7 @@ extern "C" { # define ACE_SCHED_RR 2 # endif /* ! ACE_HAS_PTHREADS */ -# if defined (ACE_HAS_PTHREADS) -// moved to pthread.h -# elif defined (ACE_HAS_STHREADS) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Solaris threads, without PTHREADS. -// Typedefs to help compatibility with Windows NT and Pthreads. -typedef thread_t ACE_thread_t; -// Native TSS key type (not for general use) -typedef thread_key_t ACE_OS_thread_key_t; -// Application TSS key type (use this type except in TSS Emulation) -# if defined (ACE_HAS_TSS_EMULATION) - typedef u_int ACE_thread_key_t; -# else /* ! ACE_HAS_TSS_EMULATION */ - typedef ACE_OS_thread_key_t ACE_thread_key_t; -# endif /* ! ACE_HAS_TSS_EMULATION */ -typedef mutex_t ACE_mutex_t; -# if !defined (ACE_LACKS_RWLOCK_T) -typedef rwlock_t ACE_rwlock_t; -# endif /* !ACE_LACKS_RWLOCK_T */ -# if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM) -typedef sema_t ACE_sema_t; -# endif /* !ACE_HAS_POSIX_SEM */ - -typedef cond_t ACE_cond_t; -struct ACE_Export ACE_condattr_t -{ - int type; -}; -struct ACE_Export ACE_mutexattr_t -{ - int type; -}; -typedef ACE_thread_t ACE_hthread_t; -typedef ACE_mutex_t ACE_thread_mutex_t; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# define THR_CANCEL_DISABLE 0 -# define THR_CANCEL_ENABLE 0 -# define THR_CANCEL_DEFERRED 0 -# define THR_CANCEL_ASYNCHRONOUS 0 -# define THR_JOINABLE 0 -# define THR_SCHED_FIFO 0 -# define THR_SCHED_RR 0 -# define THR_SCHED_DEFAULT 0 -# define THR_INHERIT_SCHED 0 -# define THR_SCOPE_PROCESS 0 - -# elif defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) # include /**/ <sysLib.h> // for sysClkRateGet() # include /**/ <types/vxTypes.h> # if !defined (__RTP__) @@ -230,8 +160,8 @@ typedef struct typedef ACE_VX_TASK_ID ACE_thread_t; typedef ACE_VX_TASK_ID ACE_hthread_t; // Key type: the ACE TSS emulation requires the key type be unsigned, -// for efficiency. (Current POSIX and Solaris TSS implementations also -// use u_int, so the ACE TSS emulation is compatible with them.) +// for efficiency. (Current POSIX implementation use u_int, so the +// ACE TSS emulation is compatible with them.) // Native TSS key type typedef u_int ACE_OS_thread_key_t; // Application TSS key type (use this type except in TSS Emulation) @@ -424,11 +354,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef pthread_rwlock_t ACE_rwlock_t; ACE_END_VERSIONED_NAMESPACE_DECL -# elif defined (ACE_HAS_STHREADS) -# include /**/ <synch.h> -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef rwlock_t ACE_rwlock_t; -ACE_END_VERSIONED_NAMESPACE_DECL # endif /* ACE_LACKS_RWLOCK_T */ // Define some default thread priorities on all threaded platforms, if @@ -743,23 +668,10 @@ typedef DWORD ACE_id_t; typedef int ACE_pri_t; # define ACE_SELF (0) #else /* !defined (ACE_WIN32) */ -# if defined (ACE_HAS_IDTYPE_T) - typedef idtype_t ACE_idtype_t; -# else typedef int ACE_idtype_t; -# endif /* ACE_HAS_IDTYPE_T */ -# if defined (ACE_HAS_STHREADS) -# if defined (ACE_LACKS_PRI_T) - typedef int pri_t; -# endif /* ACE_LACKS_PRI_T */ - typedef id_t ACE_id_t; -# define ACE_SELF P_MYID - typedef pri_t ACE_pri_t; -# else /* ! ACE_HAS_STHREADS */ typedef long ACE_id_t; # define ACE_SELF (-1) typedef short ACE_pri_t; -# endif /* ! ACE_HAS_STHREADS */ #endif /* !defined (ACE_WIN32) */ # if defined (ACE_HAS_TSS_EMULATION) @@ -1031,10 +943,6 @@ extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) # elif defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CLEANUP) -// Though we are defining a extern "C" function to match the prototype of -// pthread_cleanup_push, it is undone by the Solaris header file -// /usr/include/pthread.h. So this macro generates a warning under Solaris -// with SunCC. This is a bug in the Solaris header file. extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) @@ -1335,10 +1243,6 @@ namespace ACE_OS { //@} /// Low-level interface to @c priocntl(2). - /** - * Can't call the following priocntl, because that's a macro on - * Solaris. - */ ACE_NAMESPACE_INLINE_FUNCTION long priority_control (ACE_idtype_t, ACE_id_t, int, void *); diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index af1ff53ab0d..93262e0c87f 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -16,10 +16,6 @@ # include "ace/Handle_Set.h" # endif /* ACE_USES_FIFO_SEM */ -#if defined (ACE_HAS_PRIOCNTL) -# include /**/ <sys/priocntl.h> -#endif /* ACE_HAS_PRIOCNTL */ - #if defined (ACE_HAS_ALLOC_HOOKS) # include "ace/Malloc_Base.h" #endif /* ACE_HAS_ALLOC_HOOKS */ @@ -247,15 +243,10 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_broadcast (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_broadcast (cv), - result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::WakeAllConditionVariable (cv); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -270,13 +261,10 @@ ACE_OS::cond_destroy (ACE_cond_t *cv) # if defined (ACE_HAS_PTHREADS) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_destroy (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_destroy (cv), result), int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) // Windows doesn't have a destroy return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -312,17 +300,10 @@ ACE_OS::cond_init (ACE_cond_t *cv, result = -1; // ACE_ADAPT_RETVAL used it for intermediate status return result; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_init (cv, - attributes.type, - arg), - result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::InitializeConditionVariable (cv); return 0; -# endif /* ACE_HAS_PTHREADS vs. ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_UNUSED_ARG (attributes); @@ -360,13 +341,10 @@ ACE_OS::cond_signal (ACE_cond_t *cv) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_signal (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_signal (cv), result), int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::WakeConditionVariable (cv); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -383,10 +361,6 @@ ACE_OS::cond_wait (ACE_cond_t *cv, int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_wait (cv, external_mutex), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_wait (cv, external_mutex), result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SleepConditionVariableCS (cv, &external_mutex->thr_mutex_, INFINITE), result), @@ -420,20 +394,12 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, (ACE_TIMESPEC_PTR) &ts), result), int, result); - // We need to adjust this to make the POSIX and Solaris return + // We need to adjust this to make the POSIX return // values consistent. EAGAIN is from Pthreads DRAFT4 if (result == -1 && (errno == ETIMEDOUT || errno == EAGAIN)) errno = ETIME; -# elif defined (ACE_HAS_STHREADS) - ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0 - ? ::cond_wait (cv, external_mutex) - : ::cond_timedwait (cv, - external_mutex, - (timestruc_t*)&ts), - result), - int, result); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) int msec_timeout = 0; if (timeout != 0) @@ -450,7 +416,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, int, result); return result; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ if (timeout != 0) timeout->set (ts); // Update the time value before returning. @@ -568,18 +534,10 @@ ACE_OS::event_init (ACE_event_t *event, #endif /* ACE_HAS_WCHAR */ ACE_INLINE long -ACE_OS::priority_control (ACE_idtype_t idtype, ACE_id_t identifier, int cmd, void *arg) +ACE_OS::priority_control (ACE_idtype_t /*idtype*/, ACE_id_t /*identifier*/, int cmd, void */*arg*/) { ACE_OS_TRACE ("ACE_OS::priority_control"); -#if defined (ACE_HAS_PRIOCNTL) - return priocntl (idtype, identifier, cmd, static_cast<caddr_t> (arg)); -#else /* ! ACE_HAS_PRIOCNTL*/ - ACE_UNUSED_ARG (idtype); - ACE_UNUSED_ARG (identifier); - ACE_UNUSED_ARG (cmd); - ACE_UNUSED_ARG (arg); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL*/ } // This method is used to prepare the recursive mutex for releasing @@ -1020,7 +978,7 @@ ACE_OS::rw_rdlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_rdlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1071,7 +1029,7 @@ ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_tryrdlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1114,7 +1072,7 @@ ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_trywrlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1163,8 +1121,7 @@ ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw) result), int); # elif !defined (ACE_LACKS_RWLOCK_T) - // Some native rwlocks, such as those on Solaris, don't - // support the upgrade feature . . . + // Some native rwlocks ACE_UNUSED_ARG (rw); ACE_NOTSUP_RETURN (-1); # else /* NT, POSIX, and VxWorks don't support this natively. */ @@ -1235,7 +1192,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_unlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1294,7 +1251,7 @@ ACE_OS::rw_wrlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_wrlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1347,7 +1304,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_destroy (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1356,7 +1313,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) ACE_OS::cond_destroy (&rw->waiting_readers_); ACE_OS::cond_destroy (&rw->waiting_important_writer_); return ACE_OS::cond_destroy (&rw->waiting_writers_); -# endif /* ACE_HAS_STHREADS && !defined (ACE_LACKS_RWLOCK_T) */ +# endif /* !defined (ACE_LACKS_RWLOCK_T) */ #else ACE_UNUSED_ARG (rw); ACE_NOTSUP_RETURN (-1); @@ -1466,10 +1423,7 @@ ACE_OS::sema_destroy (ACE_sema_t *s) int r2 = ACE_OS::close (s->fd_[1]); /* ignore error */ return r0 != 0 || r1 != 0 || r2 != 0 ? -1 : 0; #elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_destroy (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int r1 = ACE_OS::mutex_destroy (&s->lock_); int r2 = ACE_OS::cond_destroy (&s->count_nonzero_); return r1 != 0 || r2 != 0 ? -1 : 0; @@ -1480,7 +1434,7 @@ ACE_OS::sema_destroy (ACE_sema_t *s) ACE_OSCALL (::semDelete (s->sema_), int, result); s->sema_ = 0; return result; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -1489,7 +1443,6 @@ ACE_OS::sema_destroy (ACE_sema_t *s) // NOTE: The previous four function definitions must appear before // ACE_OS::sema_init (). - ACE_INLINE int ACE_OS::sema_init (ACE_sema_t *s, u_int count, @@ -1601,23 +1554,6 @@ ACE_OS::sema_init (ACE_sema_t *s, # else if (name) { -# if defined (sun) - // Solaris require the name to start with a slash. Solaris - // further requires that there be no other slashes than the first. - const char *last_slash = ACE_OS::strrchr (name, '/'); - char name2[MAXPATHLEN]; - if (0 == last_slash) - { - ACE_OS::strcpy (name2, "/"); - ACE_OS::strcat (name2, name); - name = name2; - } -# if defined (sun) - else - name = last_slash; // Chop off chars preceding last slash -# endif /* sun */ -# endif /* sun */ - ACE_ALLOCATOR_RETURN (s->name_, ACE_OS::strdup (name), -1); @@ -1740,15 +1676,7 @@ ACE_OS::sema_init (ACE_sema_t *s, return 0; #elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (max); - ACE_UNUSED_ARG (sa); - ACE_UNUSED_ARG (attributes); - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_init (s, count, type, arg), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) ACE_UNUSED_ARG (max); ACE_UNUSED_ARG (sa); int result = -1; @@ -1805,7 +1733,7 @@ ACE_OS::sema_init (ACE_sema_t *s, s->name_ = 0; s->sema_ = ::semCCreate (type, count); return s->sema_ ? 0 : -1; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (s); ACE_UNUSED_ARG (count); @@ -1920,10 +1848,7 @@ ACE_OS::sema_post (ACE_sema_t *s) return 0; return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_post (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = -1; if (ACE_OS::mutex_lock (&s->lock_) == 0) @@ -1944,7 +1869,7 @@ ACE_OS::sema_post (ACE_sema_t *s) int, -1); # elif defined (ACE_VXWORKS) return ::semGive (s->sema_); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -1961,9 +1886,9 @@ ACE_OS::sema_post (ACE_sema_t *s, u_int release_count) #else // On POSIX platforms we need to emulate this ourselves. // @@ We can optimize on this implementation. However, - // the semaphore promitive on Win32 doesn't allow one + // the semaphore primitive on Win32 doesn't allow one // to increase a semaphore to more than the count it was - // first initialized. Posix and solaris don't seem to have + // first initialized. Posix doesn't seem to have // this restriction. Should we impose the restriction in // our semaphore simulation? for (size_t i = 0; i < release_count; i++) @@ -2004,14 +1929,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) return rc == 1 ? 0 : (-1); # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - // STHREADS semaphores set errno to EBUSY if trywait fails. - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_trywait (s), - result), - int); -# elif defined (ACE_HAS_PTHREADS) - +# if defined (ACE_HAS_PTHREADS) int result = -1; if (ACE_OS::mutex_lock (&s->lock_) == 0) @@ -2055,7 +1973,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) else // got the semaphore return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -2074,10 +1992,7 @@ ACE_OS::sema_wait (ACE_sema_t *s) return 0; return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_wait (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = 0; ACE_PTHREAD_CLEANUP_PUSH (&s->lock_); @@ -2123,7 +2038,7 @@ ACE_OS::sema_wait (ACE_sema_t *s) /* NOTREACHED */ # elif defined (ACE_VXWORKS) return ::semTake (s->sema_, WAIT_FOREVER); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -2228,11 +2143,7 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (s); - ACE_UNUSED_ARG (tv); - ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = 0; ACE_Errno_Guard error (errno); @@ -2331,7 +2242,7 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) tv = tv.now (); // Update to time acquired return 0; } -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_UNUSED_ARG (tv); @@ -2427,14 +2338,6 @@ ACE_OS::sigwait (sigset_t *sset, int *sig) # if (defined (__FreeBSD__) && (__FreeBSD__ < 3)) ACE_UNUSED_ARG (sset); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_STHREADS) - # if (_POSIX_C_SOURCE - 0 >= 199506L) || defined (_POSIX_PTHREAD_SEMANTICS) - errno = ::sigwait (sset, sig); - return errno == 0 ? *sig : -1; - #else - *sig = ::sigwait (sset); - return *sig; - #endif /* _POSIX_C_SOURCE - 0 >= 199506L || _POSIX_PTHREAD_SEMANTICS */ # elif defined (ACE_HAS_PTHREADS) # if defined (CYGWIN32) // Cygwin has sigwait definition, but it is not implemented @@ -2522,10 +2425,7 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_continue"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_continue (target_thread), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_HAS_PTHREAD_CONTINUE) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_continue (target_thread), @@ -2553,7 +2453,7 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread) return 0; # elif defined (ACE_HAS_VXTHREADS) return ::taskResume (target_thread); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (target_thread); ACE_NOTSUP_RETURN (-1); @@ -2565,13 +2465,11 @@ ACE_OS::thr_getconcurrency () { ACE_OS_TRACE ("ACE_OS::thr_getconcurrency"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - return ::thr_getconcurrency (); -# elif defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_GETCONCURRENCY) +# if defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_GETCONCURRENCY) return pthread_getconcurrency (); # else ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_THREADS */ @@ -2594,9 +2492,6 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) result); priority = param.sched_priority; return result; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (ht_id, &priority), result), int); # elif defined (ACE_HAS_WTHREADS) ACE_Errno_Guard error (errno); priority = ::GetThreadPriority (ht_id); @@ -2623,7 +2518,7 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); @@ -2647,9 +2542,6 @@ ACE_OS::thr_getspecific_native (ACE_OS_thread_key_t key, void **data) # if defined (ACE_HAS_PTHREADS) *data = pthread_getspecific (key); return 0; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), result), int); # elif defined (ACE_HAS_WTHREADS) *data = ::TlsGetValue (key); if (*data == 0 && ::GetLastError () != NO_ERROR) @@ -2705,11 +2597,7 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (thr_handle, 0, status), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_LACKS_PTHREAD_JOIN) ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); @@ -2754,7 +2642,7 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); @@ -2769,11 +2657,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (waiter_id, thr_id, status), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_LACKS_PTHREAD_JOIN) ACE_UNUSED_ARG (waiter_id); ACE_UNUSED_ARG (thr_id); @@ -2793,7 +2677,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, // This could be implemented if the DLL-Main function or the // task exit base class some log the threads which have exited ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (waiter_id); ACE_UNUSED_ARG (thr_id); @@ -2819,11 +2703,6 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) result), int); # endif /* ACE_LACKS_PTHREAD_KILL */ -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_kill (thr_id, signum), - result), - int); # elif defined (ACE_HAS_VXTHREADS) //FUZZ: disable check_for_lack_ACE_OS return ::kill (thr_id, signum); @@ -2832,7 +2711,7 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) ACE_UNUSED_ARG (thr_id); ACE_UNUSED_ARG (signum); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (thr_id); ACE_UNUSED_ARG (signum); @@ -2845,14 +2724,7 @@ ACE_OS::thr_min_stack () { ACE_OS_TRACE ("ACE_OS::thr_min_stack"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) -# if defined (ACE_HAS_THR_MINSTACK) - // Tandem did some weirdo mangling of STHREAD names... - return ::thr_minstack (); -# else - return ::thr_min_stack (); -# endif /* !ACE_HAS_THR_MINSTACK */ -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (_SC_THREAD_STACK_MIN) return (size_t) ACE_OS::sysconf (_SC_THREAD_STACK_MIN); # elif defined (PTHREAD_STACK_MIN) @@ -2874,7 +2746,7 @@ ACE_OS::thr_min_stack () return status == OK ? taskDesc.td_stackSize : 0; # else /* Should not happen... */ ACE_NOTSUP_RETURN (0); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_NOTSUP_RETURN (0); #endif /* ACE_HAS_THREADS */ @@ -2930,13 +2802,11 @@ ACE_OS::thr_self () # if defined (ACE_HAS_PTHREADS) // Note, don't use "::" here since the following call is often a macro. return pthread_self (); -# elif defined (ACE_HAS_STHREADS) - return ::thr_self (); # elif defined (ACE_HAS_WTHREADS) return ::GetCurrentThreadId (); # elif defined (ACE_HAS_VXTHREADS) return ::taskIdSelf (); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else return 1; // Might as well make it the first thread ;-) #endif /* ACE_HAS_THREADS */ @@ -2966,13 +2836,11 @@ ACE_OS::thr_self (ACE_hthread_t &self) self = pthread_self (); # elif defined (ACE_HAS_THREAD_SELF) self = ::thread_self (); -# elif defined (ACE_HAS_STHREADS) - self = ::thr_self (); # elif defined (ACE_HAS_WTHREADS) self = ::GetCurrentThread (); # elif defined (ACE_HAS_VXTHREADS) self = ::taskIdSelf (); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else self = 1; // Might as well make it the main thread ;-) #endif /* ACE_HAS_THREADS */ @@ -3014,10 +2882,6 @@ ACE_OS::thr_setcancelstate (int new_state, int *old_state) break; } return result; -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (new_state); - ACE_UNUSED_ARG (old_state); - ACE_NOTSUP_RETURN (-1); # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (new_state); ACE_UNUSED_ARG (old_state); @@ -3087,18 +2951,13 @@ ACE_OS::thr_setconcurrency (int hint) { ACE_OS_TRACE ("ACE_OS::thr_setconcurrency"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setconcurrency (hint), - result), - int); -# elif defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_SETCONCURRENCY) +# if defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_SETCONCURRENCY) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_setconcurrency (hint), result), int); # else ACE_UNUSED_ARG (hint); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (hint); ACE_NOTSUP_RETURN (-1); @@ -3135,9 +2994,6 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) ¶m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setprio (ht_id, priority), result), int); # elif defined (ACE_HAS_WTHREADS) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (ht_id, priority), ace_result_), @@ -3149,7 +3005,7 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); @@ -3165,7 +3021,7 @@ ACE_OS::thr_sigsetmask (int how, ACE_OS_TRACE ("ACE_OS::thr_sigsetmask"); #if defined (ACE_HAS_THREADS) # if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK) - // DCE threads and Solaris 2.4 have no such function. + // DCE threads ACE_UNUSED_ARG (osm); ACE_UNUSED_ARG (nsm); ACE_UNUSED_ARG (how); @@ -3174,9 +3030,6 @@ ACE_OS::thr_sigsetmask (int how, # elif defined (ACE_HAS_SIGTHREADMASK) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigthreadmask (how, nsm, osm), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_sigsetmask (how, nsm, osm), result), int); # elif defined (ACE_HAS_PTHREADS) # if !defined (ACE_LACKS_PTHREAD_SIGMASK) int result; @@ -3241,10 +3094,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_suspend"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_suspend (target_thread), result), int, -1); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_HAS_PTHREAD_SUSPEND) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_suspend (target_thread), result), int); @@ -3263,7 +3113,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread) /* NOTREACHED */ # elif defined (ACE_HAS_VXTHREADS) return ::taskSuspend (target_thread); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (target_thread); ACE_NOTSUP_RETURN (-1); @@ -3277,9 +3127,6 @@ ACE_OS::thr_testcancel () #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL) pthread_testcancel (); -# elif defined (ACE_HAS_STHREADS) -# elif defined (ACE_HAS_WTHREADS) -# elif defined (ACE_HAS_VXTHREADS) # else // no-op: can't use ACE_NOTSUP_RETURN because there is no return value # endif /* ACE_HAS_PTHREADS */ @@ -3294,8 +3141,6 @@ ACE_OS::thr_yield () #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) ::sched_yield (); -# elif defined (ACE_HAS_STHREADS) - ::thr_yield (); # elif defined (ACE_HAS_WTHREADS) ::Sleep (0); # elif defined (ACE_HAS_VXTHREADS) @@ -3304,7 +3149,7 @@ ACE_OS::thr_yield () // Now, it does seem to work. The context_switch_time test // works fine with task_delay set to 0. ::taskDelay (0); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ; #endif /* ACE_HAS_THREADS */ @@ -3352,13 +3197,13 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, } return 0; -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) +# elif defined (ACE_HAS_PTHREADS) // Force the use of USYNC_THREAD! return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg, 0, lock_type); # elif defined (ACE_HAS_VXTHREADS) return mutex_init (m, lock_type, name, arg); -# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (m); @@ -3395,12 +3240,12 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, } return 0; -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) +# elif defined (ACE_HAS_PTHREADS) // Force the use of USYNC_THREAD! return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg, 0, lock_type); # elif defined (ACE_HAS_VXTHREADS) return mutex_init (m, lock_type, name, arg); -# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (m); ACE_UNUSED_ARG (lock_type); @@ -3483,7 +3328,7 @@ ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m) ACE_UNUSED_ARG (m); ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_WIN32_TRYLOCK */ -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_VXWORKS) +# elif defined (ACE_HAS_PTHREADS) || defined (ACE_VXWORKS) return ACE_OS::mutex_trylock (m); #endif /* Threads variety case */ diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp index 2af9006fb5f..6ede9036026 100644 --- a/ACE/ace/OS_NS_netdb.cpp +++ b/ACE/ace/OS_NS_netdb.cpp @@ -34,12 +34,6 @@ # include "ace/Malloc_Base.h" #endif -// Include if_arp so that getmacaddr can use the -// arp structure. -#if defined (sun) -# include /**/ <net/if_arp.h> -#endif - #include <algorithm> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -131,58 +125,6 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_PHARLAP_RT */ # endif /* ACE_HAS_PHARLAP */ -#elif defined (sun) - - /** obtain the local host name */ - char hostname [MAXHOSTNAMELEN]; - ACE_OS::hostname (hostname, sizeof (hostname)); - - /** Get the hostent to use with ioctl */ - struct hostent *phost = - ACE_OS::gethostbyname (hostname); - - if (phost == 0) - return -1; - - ACE_HANDLE handle = - ACE_OS::socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP); - - if (handle == ACE_INVALID_HANDLE) - return -1; - - char **paddrs = phost->h_addr_list; - - struct arpreq ar; - - struct sockaddr_in *psa = - (struct sockaddr_in *)&(ar.arp_pa); - - ACE_OS::memset (&ar, - 0, - sizeof (struct arpreq)); - - psa->sin_family = AF_INET; - - ACE_OS::memcpy (&(psa->sin_addr), - *paddrs, - sizeof (struct in_addr)); - - if (ACE_OS::ioctl (handle, - SIOCGARP, - &ar) == -1) - { - ACE_OS::close (handle); - return -1; - } - - ACE_OS::close (handle); - - ACE_OS::memcpy (node->node, - ar.arp_ha.sa_data, - 6); - - return 0; - #elif defined (ACE_LINUX) && !defined (ACE_LACKS_NETWORKING) // It's easiest to know the first MAC-using interface. Use the BSD diff --git a/ACE/ace/OS_NS_pwd.inl b/ACE/ace/OS_NS_pwd.inl index 3353f649469..74eae66e517 100644 --- a/ACE/ace/OS_NS_pwd.inl +++ b/ACE/ace/OS_NS_pwd.inl @@ -48,14 +48,6 @@ ACE_OS::getpwnam_r (const char *name, ACE_UNUSED_ARG (bufsize); ACE_UNUSED_ARG (result); ACE_NOTSUP_RETURN (0); -#elif defined (ACE_HAS_STHREADS) - if (::getpwnam_r (name, pwd, buffer, bufsize) != 0) - { - *result = 0; - return -1; - } - *result = pwd; - return 0; #else return ::getpwnam_r (name, pwd, buffer, bufsize, result); #endif /* ACE_LACKS_PWD_FUNCTIONS */ diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index ac5f568abdf..6066165912e 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -1068,7 +1068,6 @@ ACE_INLINE int ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) { # if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \ - (defined (sun) && !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION-0==4))) || \ defined (ACE_HAS_VSWPRINTF) || \ (defined (_MSC_VER)) @@ -1148,10 +1147,8 @@ ACE_INLINE int ACE_OS::vsnprintf (wchar_t *buffer, size_t maxlen, const wchar_t *format, va_list ap) { # if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \ - (defined (sun) && !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION-0==4))) || \ defined (ACE_HAS_VSWPRINTF) || \ defined (ACE_WIN32) - int result; # if defined (ACE_WIN32) && !defined (ACE_HAS_C99_VSNWPRINTF) diff --git a/ACE/ace/OS_NS_sys_stat.inl b/ACE/ace/OS_NS_sys_stat.inl index 3e266681896..b3a7d38e142 100644 --- a/ACE/ace/OS_NS_sys_stat.inl +++ b/ACE/ace/OS_NS_sys_stat.inl @@ -28,12 +28,7 @@ namespace ACE_OS fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); -#if defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for fstat(), this is a wrapper - // for _fxstat() use of the macro. - // causes compile and runtime problems. - return ::_fxstat (_STAT_VER, handle, stp); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) BY_HANDLE_FILE_INFORMATION fdata; if (::GetFileInformationByHandle (handle, &fdata) == FALSE) @@ -65,7 +60,7 @@ namespace ACE_OS return MQX_Filesystem::inst ().fstat (handle, stp); #else return ::fstat (handle, stp); -#endif /* !ACE_HAS_X86_STAT_MACROS */ +#endif /* !ACE_WIN32 */ } // This function returns the number of bytes in the file referenced by @@ -123,11 +118,7 @@ namespace ACE_OS ACE_OS_TRACE ("ACE_OS::lstat"); # if defined (ACE_LACKS_LSTAT) return ACE_OS::stat (file, stp); -# elif defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for lstat(), this macro is a - // wrapper for _lxstat(). - return ::_lxstat (_STAT_VER, file, stp); -# else /* !ACE_HAS_X86_STAT_MACROS */ +# else /* !ACE_LACKS_LSTAT */ return ::lstat (file, stp); # endif /* ACE_LACKS_LSTAT */ } @@ -194,10 +185,6 @@ namespace ACE_OS ACE_OS_TRACE ("ACE_OS::stat"); #if defined (ACE_LACKS_STAT) ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for stat(), this macro is a - // wrapper for _xstat(). - return ::_xstat (_STAT_VER, file, stp); #elif defined (ACE_MQX) return MQX_Filesystem::inst ().stat (file, stp); #else diff --git a/ACE/ace/OS_NS_time.inl b/ACE/ace/OS_NS_time.inl index 49d3b8c5669..a41b805d4d0 100644 --- a/ACE/ace/OS_NS_time.inl +++ b/ACE/ace/OS_NS_time.inl @@ -381,8 +381,7 @@ ACE_OS::nanosleep (const struct timespec *requested, #if defined (ACE_HAS_CLOCK_GETTIME) // ::nanosleep () is POSIX 1003.1b. So is ::clock_gettime (). So, // if ACE_HAS_CLOCK_GETTIME is defined, then ::nanosleep () should - // be available on the platform. On Solaris 2.x, both functions - // require linking with -lposix4. + // be available on the platform return ::nanosleep ((ACE_TIMESPEC_PTR) requested, remaining); #else ACE_UNUSED_ARG (remaining); diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index 2d618701ad4..49b5736f970 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -255,12 +255,7 @@ ACE_OS::fork (const ACE_TCHAR *program_name) ACE_UNUSED_ARG (program_name); ACE_NOTSUP_RETURN (pid_t (-1)); # else - pid_t const pid = -# if defined (ACE_HAS_STHREADS) - ::fork1 (); -#else - ::fork (); -#endif /* ACE_HAS_STHREADS */ + pid_t const pid = ::fork (); #if !defined (ACE_HAS_MINIMAL_ACE_OS) && !defined (ACE_HAS_THREADS) diff --git a/ACE/ace/OS_NS_unistd.h b/ACE/ace/OS_NS_unistd.h index a8a8fc3b979..6d4f270d132 100644 --- a/ACE/ace/OS_NS_unistd.h +++ b/ACE/ace/OS_NS_unistd.h @@ -119,8 +119,8 @@ namespace ACE_OS char *const argv[]); //@{ - /// Forks and exec's a process in a manner that works on Solaris and - /// NT. argv[0] must be the full path name to the executable. + /// Forks and exec's a process in a manner that works Windows. + /// argv[0] must be the full path name to the executable. ACE_NAMESPACE_INLINE_FUNCTION pid_t fork (); diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 67de5e58951..8c5d2834ade 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -1055,18 +1055,10 @@ ACE_OS::sysconf (int name) } ACE_INLINE long -ACE_OS::sysinfo (int cmd, char *buf, long count) +ACE_OS::sysinfo (int /*cmd*/, char */*buf*/, long /*count*/) { ACE_OS_TRACE ("ACE_OS::sysinfo"); -#if defined (ACE_HAS_SYSV_SYSINFO) - return ::sysinfo (cmd, buf, count); -#else - ACE_UNUSED_ARG (cmd); - ACE_UNUSED_ARG (buf); - ACE_UNUSED_ARG (count); - ACE_NOTSUP_RETURN (0); -#endif /* ACE_HAS_SYSV_SYSINFO */ } ACE_INLINE int diff --git a/ACE/ace/OS_TLI.h b/ACE/ace/OS_TLI.h index 01795eb99d6..ab9fb5f3724 100644 --- a/ACE/ace/OS_TLI.h +++ b/ACE/ace/OS_TLI.h @@ -56,7 +56,6 @@ struct netbuf { }; // desired, local or peer, while t_getprotaddr() gets both at once. // t_getname() has values defined for the type, so these aren't defined // for XTI systems. So, define them here for ACE API users to use. - // These values were taken from sys/tiuser.h on Solaris. # if !defined (LOCALNAME) # define LOCALNAME 0 # endif @@ -101,18 +100,6 @@ extern "C" } # endif /* !ACE_HAS_TLI_PROTOTYPES */ -# if defined (ACE_HAS_TIUSER_H) -# include /**/ <tiuser.h> -# else - /* What to do here??? Is there a tli.h? */ -# endif /* ACE_HAS_TIUSER_H */ - -# if defined (ACE_HAS_SVR4_TLI) - // t_getname is a TLI extension added by some platforms before XTI - // was widely available. However, it's not often in the system's - // header files. Sun OS, for example, is like this. - extern "C" int t_getname (int, struct netbuf *, int); -# endif /* ACE_HAS_SVR4_TLI */ # endif /* !ACE_HAS_XTI */ # endif /* ACE_HAS_XTI || ACE_HAS_TLI */ diff --git a/ACE/ace/OS_TLI.inl b/ACE/ace/OS_TLI.inl index e2bc18c830f..48d55ccc646 100644 --- a/ACE/ace/OS_TLI.inl +++ b/ACE/ace/OS_TLI.inl @@ -87,11 +87,7 @@ ACE_INLINE void t_error (const char *errmsg) { #if defined (ACE_HAS_TLI) -#if defined (ACE_HAS_BROKEN_T_ERROR) - ::t_error (const_cast<char *> (errmsg)); -#else ::t_error (errmsg); -#endif /* ACE_HAS_BROKEN_T_ERROR */ #else ACE_UNUSED_ARG (errmsg); #endif /* ACE_HAS_TLI */ @@ -163,16 +159,13 @@ t_getname (ACE_HANDLE handle, struct netbuf *namep, int type) else namep->len = peer.addr.len; return 0; - -#elif defined (ACE_HAS_SVR4_TLI) - return ::t_getname (handle, namep, type); #else ACE_UNUSED_ARG (handle); ACE_UNUSED_ARG (namep); ACE_UNUSED_ARG (type); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } ACE_INLINE int diff --git a/ACE/ace/OS_Thread_Adapter.cpp b/ACE/ace/OS_Thread_Adapter.cpp index 514cc692a40..bdf52d7fd50 100644 --- a/ACE/ace/OS_Thread_Adapter.cpp +++ b/ACE/ace/OS_Thread_Adapter.cpp @@ -57,23 +57,6 @@ ACE_OS_Thread_Adapter::invoke () // not to access <this> anywhere below this point. delete this; -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // On SunOS, the LWP priority needs to be set in order to get - // preemption when running in the RT class. This is the ACE way to - // do that . . . - ACE_hthread_t thr_handle; - ACE_OS::thr_self (thr_handle); - int prio; - - // thr_getprio () on the current thread should never fail. - ACE_OS::thr_getprio (thr_handle, prio); - - // ACE_OS::thr_setprio () has the special logic to set the LWP priority, - // if running in the RT class. - ACE_OS::thr_setprio (prio); - -#endif /* ACE_NEEDS_LWP_PRIO_SET */ - if (cancel_flags != 0) { // If both flags are set, ignore this. diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp index ecb44654087..3db3504db52 100644 --- a/ACE/ace/Object_Manager_Base.cpp +++ b/ACE/ace/Object_Manager_Base.cpp @@ -218,21 +218,18 @@ ACE_OS_Object_Manager::init () # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_OS_MONITOR_LOCK) if (ACE_OS::thread_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_OS_MONITOR_LOCK")); ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_CLEANUP_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_CLEANUP_LOCK")); ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_LOG_MSG_INSTANCE_LOCK) if (ACE_OS::thread_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_LOG_MSG_INSTANCE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK")); @@ -240,7 +237,6 @@ ACE_OS_Object_Manager::init () ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_KEY_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -248,7 +244,6 @@ ACE_OS_Object_Manager::init () ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_BASE_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); @@ -340,7 +335,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::thread_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -352,7 +346,6 @@ ACE_OS_Object_Manager::fini () ACE_OS_MONITOR_LOCK) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -364,7 +357,6 @@ ACE_OS_Object_Manager::fini () ACE_TSS_CLEANUP_LOCK) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::thread_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object [ACE_LOG_MSG_INSTANCE_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -377,7 +369,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_HAS_TSS_EMULATION) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -387,7 +378,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 00035c87937..e720c06dbe7 100644 --- a/ACE/ace/POSIX_Proactor.cpp +++ b/ACE/ace/POSIX_Proactor.cpp @@ -6,10 +6,6 @@ #include "ace/POSIX_Proactor.inl" #endif /* __ACE_INLINE__ */ -# if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -# endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #include "ace/ACE.h" #include "ace/Flag_Manip.h" #include "ace/Task_T.h" @@ -19,10 +15,6 @@ #include "ace/OS_NS_signal.h" #include "ace/OS_NS_unistd.h" -#if defined (sun) -# include "ace/OS_NS_strings.h" -#endif /* sun */ - // ********************************************************************* ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -59,23 +51,7 @@ public: ACE_POSIX_Proactor::ACE_POSIX_Proactor () : os_id_ (ACE_OS_UNDEFINED) { -#if defined(sun) - - os_id_ = ACE_OS_SUN; // set family - - char Buf [32]; - - ::memset(Buf,0,sizeof(Buf)); - - ACE_OS::sysinfo (SI_RELEASE , Buf, sizeof(Buf)-1); - - if (ACE_OS::strcasecmp (Buf , "5.6") == 0) - os_id_ = ACE_OS_SUN_56; - else if (ACE_OS::strcasecmp (Buf , "5.7") == 0) - os_id_ = ACE_OS_SUN_57; - else if (ACE_OS::strcasecmp (Buf , "5.8") == 0) - os_id_ = ACE_OS_SUN_58; -#elif defined(__OpenBSD) +#if defined(__OpenBSD) os_id_ = ACE_OS_OPENBSD; // set family // do the same @@ -1846,7 +1822,7 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout) int error_status = 0; size_t transfer_count = 0; - if (sig_info.si_code == SI_ASYNCIO || this->os_id_ == ACE_OS_SUN_56) + if (sig_info.si_code == SI_ASYNCIO) { flg_aio = 1; // AIO signal received // define index to start @@ -1856,21 +1832,6 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout) #else index = static_cast<size_t> (sig_info.si_value.sival_int); #endif /* ACE_HAS_SIGVAL_SIGVAL_INT */ - // Assume we have a correctly-functioning implementation, and that - // there is one I/O to process, and it's correctly specified in the - // siginfo received. There are, however, some special situations - // where this isn't true... - if (os_id_ == ACE_OS_SUN_56) // Solaris 6 - { - // 1. Solaris 6 always loses any RT signal, - // if it has more SIGQUEMAX=32 pending signals - // so we should scan the whole aiocb list - // 2. Moreover,it has one more bad habit - // to notify aio completion - // with SI_QUEUE code instead of SI_ASYNCIO, hence the - // OS_SUN_56 addition to the si_code check, above. - count = aiocb_list_max_size_; - } } else if (sig_info.si_code != SI_QUEUE) { diff --git a/ACE/ace/POSIX_Proactor.h b/ACE/ace/POSIX_Proactor.h index 884ca481448..143e16b269b 100644 --- a/ACE/ace/POSIX_Proactor.h +++ b/ACE/ace/POSIX_Proactor.h @@ -64,9 +64,6 @@ public: /// Signals notifications PROACTOR_SIG = 2, - /// SUN specific aiowait() - PROACTOR_SUN = 3, - /// Callback notifications PROACTOR_CB = 4 }; @@ -78,11 +75,6 @@ public: ACE_OS_WIN = 0x0100, // for future ACE_OS_WIN_NT = ACE_OS_WIN | 0x0001, ACE_OS_WIN_2000 = ACE_OS_WIN | 0x0002, - ACE_OS_SUN = 0x0200, // Sun Solaris family - ACE_OS_SUN_55 = ACE_OS_SUN | 0x0001, - ACE_OS_SUN_56 = ACE_OS_SUN | 0x0002, - ACE_OS_SUN_57 = ACE_OS_SUN | 0x0004, - ACE_OS_SUN_58 = ACE_OS_SUN | 0x0008, ACE_OS_LINUX = 0x0800, // Linux family ACE_OS_FREEBSD = 0x1000, // FreeBSD family ACE_OS_IRIX = 0x2000, // SGI IRIX family diff --git a/ACE/ace/Profile_Timer.cpp b/ACE/ace/Profile_Timer.cpp index 8893443c98a..838e7860b8a 100644 --- a/ACE/ace/Profile_Timer.cpp +++ b/ACE/ace/Profile_Timer.cpp @@ -7,12 +7,7 @@ #include "ace/Log_Category.h" #include "ace/OS_NS_string.h" -#if defined (ACE_HAS_PRUSAGE_T) -#include "ace/OS_NS_fcntl.h" -#include "ace/OS_NS_unistd.h" -#endif - -#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) +#if defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) #include "ace/OS_NS_stdio.h" #if defined (ACE_HAS_ALLOC_HOOKS) @@ -40,32 +35,17 @@ ACE_Profile_Timer::ACE_Profile_Timer () ACE_OS::memset (&this->begin_usage_, 0, sizeof this->begin_usage_); ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_); -# if defined (ACE_HAS_PRUSAGE_T) - ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_); - char buf[20]; - ACE_OS::sprintf (buf, 20, "/proc/%d", static_cast<int> (ACE_OS::getpid ())); - - this->proc_handle_ = ACE_OS::open (buf, O_RDONLY, 0); - if (this->proc_handle_ == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - buf)); -# elif defined (ACE_HAS_GETRUSAGE) +# if defined (ACE_HAS_GETRUSAGE) ACE_OS::memset (&this->begin_time_, 0, sizeof this->begin_time_); ACE_OS::memset (&this->end_time_, 0, sizeof this->end_time_); ACE_OS::memset (&this->last_time_, 0, sizeof this->last_time_); -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ } // Terminate the interval timer. ACE_Profile_Timer::~ACE_Profile_Timer () { ACE_TRACE ("ACE_Profile_Timer::~ACE_Profile_Timer"); -# if defined (ACE_HAS_PRUSAGE_T) - if (ACE_OS::close (this->proc_handle_) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_Profile_Timer::~ACE_Profile_Timer"))); -# endif /* ACE_HAS_PRUSAGE_T */ } // Return the resource utilization. @@ -77,92 +57,7 @@ ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage) usage = this->end_usage_; } -# if defined (ACE_HAS_PRUSAGE_T) - -// Compute the amount of resource utilization since the start time. - -void -ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &rusage) -{ - ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage"); - rusage.pr_lwpid = - this->end_usage_.pr_lwpid - this->last_usage_.pr_lwpid; - rusage.pr_count = - this->end_usage_.pr_count - this->last_usage_.pr_count; - rusage.pr_minf = - this->end_usage_.pr_minf - this->last_usage_.pr_minf; - rusage.pr_majf = - this->end_usage_.pr_majf - this->last_usage_.pr_majf; - rusage.pr_inblk = - this->end_usage_.pr_inblk - this->last_usage_.pr_inblk; - rusage.pr_oublk = - this->end_usage_.pr_oublk - this->last_usage_.pr_oublk; - rusage.pr_msnd = - this->end_usage_.pr_msnd - this->last_usage_.pr_msnd; - rusage.pr_mrcv = - this->end_usage_.pr_mrcv - this->last_usage_.pr_mrcv; - rusage.pr_sigs = - this->end_usage_.pr_sigs - this->last_usage_.pr_sigs; - this->subtract (rusage.pr_wtime, - this->end_usage_.pr_wtime, - this->last_usage_.pr_wtime); - this->subtract (rusage.pr_ltime, - this->end_usage_.pr_ltime, - this->last_usage_.pr_ltime); - this->subtract (rusage.pr_slptime, - this->end_usage_.pr_slptime, - this->last_usage_.pr_slptime); - rusage.pr_vctx = - this->end_usage_.pr_vctx - this->last_usage_.pr_vctx; - rusage.pr_ictx = - this->end_usage_.pr_ictx - this->last_usage_.pr_ictx; - rusage.pr_sysc = - this->end_usage_.pr_sysc - this->last_usage_.pr_sysc; - rusage.pr_ioch = - this->end_usage_.pr_ioch - this->last_usage_.pr_ioch; -} - -// Compute the elapsed time. - -void -ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et) -{ - ACE_TRACE ("ACE_Profile_Timer::compute_times"); - timespec_t td; - - ACE_Profile_Timer::Rusage &end = this->end_usage_; - ACE_Profile_Timer::Rusage &begin = this->begin_usage_; - - this->subtract (td, end.pr_tstamp, begin.pr_tstamp); - // Convert nanoseconds into seconds. - et.real_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; - this->subtract (td, end.pr_utime, begin.pr_utime); - // Convert nanoseconds into seconds. - et.user_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; - this->subtract (td, end.pr_stime, begin.pr_stime); - // Convert nanoseconds into seconds. - et.system_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; -} - -// Determine the difference between T1 and T2. - -void -ACE_Profile_Timer::subtract (timespec_t &tdiff, timespec_t &t1, timespec_t &t0) -{ - ACE_TRACE ("ACE_Profile_Timer::subtract"); - tdiff.tv_sec = t1.tv_sec - t0.tv_sec; - tdiff.tv_nsec = t1.tv_nsec - t0.tv_nsec; - - // Normalize the time. - - while (tdiff.tv_nsec < 0) - { - tdiff.tv_sec--; - tdiff.tv_nsec += ACE_ONE_SECOND_IN_NSECS; - } -} - -# elif defined (ACE_HAS_GETRUSAGE) +# if defined (ACE_HAS_GETRUSAGE) // Compute the amount of resource utilization since the start time. void @@ -255,7 +150,7 @@ ACE_Profile_Timer::subtract (timeval &tdiff, timeval &t1, timeval &t0) } } -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ // Compute the amount of time that has elapsed between start and stop. @@ -269,7 +164,7 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_WIN32) /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +#elif defined (ACE_WIN32) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -433,5 +328,4 @@ ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_HAS_PRUSAGE_T) || - defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ +#endif /* defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ diff --git a/ACE/ace/Profile_Timer.h b/ACE/ace/Profile_Timer.h index 6d682b72c50..9419f19c505 100644 --- a/ACE/ace/Profile_Timer.h +++ b/ACE/ace/Profile_Timer.h @@ -96,14 +96,7 @@ private: /// Keep track of the last rusage for incremental timing. ACE_Profile_Timer::Rusage last_usage_; -#if defined (ACE_HAS_PRUSAGE_T) - /// Subtract two timestructs and store their difference. - void subtract (timespec_t &tdiff, timespec_t &t0, timespec_t &t1); - - /// I/O handle for /proc file system. - ACE_HANDLE proc_handle_; - -#elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) /// Subtract two timestructs and store their difference. void subtract (timeval &tdiff, timeval &t0, @@ -117,12 +110,12 @@ private: /// Keep track of the last time for incremental timing. timeval last_time_; -#endif /* ACE_HAS_PRUSAGE_T */ +#endif /* ACE_HAS_GETRUSAGE */ -#if defined (ACE_WIN32) || (!defined (ACE_HAS_PRUSAGE_T) && !defined (ACE_HAS_GETRUSAGE)) +#if defined (ACE_WIN32) || !defined (ACE_HAS_GETRUSAGE) /// The high resolution timer ACE_High_Res_Timer timer_; -#endif /* ACE_WIN32 || !ACE_HAS_PRUSAGE_T && !ACE_HAS_GETRUSAGE */ +#endif /* ACE_WIN32 || !ACE_HAS_GETRUSAGE */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Profile_Timer.inl b/ACE/ace/Profile_Timer.inl index d0fd3afc58f..f4be327fac8 100644 --- a/ACE/ace/Profile_Timer.inl +++ b/ACE/ace/Profile_Timer.inl @@ -3,35 +3,8 @@ #include "ace/OS_NS_sys_resource.h" #include "ace/Global_Macros.h" -#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) - -# if defined (ACE_HAS_PRUSAGE_T) -# include "ace/OS_NS_stropts.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Profile_Timer::start () -{ - ACE_TRACE ("ACE_Profile_Timer::start"); - return ACE_OS::ioctl (this->proc_handle_, - PIOCUSAGE, - &this->begin_usage_); -} - -ACE_INLINE int -ACE_Profile_Timer::stop () -{ - ACE_TRACE ("ACE_Profile_Timer::stop"); - this->last_usage_ = this->end_usage_; - return ACE_OS::ioctl (this->proc_handle_, - PIOCUSAGE, - &this->end_usage_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -# elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) +# if defined (ACE_HAS_GETRUSAGE) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -59,7 +32,7 @@ ACE_Profile_Timer::stop () ACE_END_VERSIONED_NAMESPACE_DECL -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ #elif defined (ACE_WIN32) @@ -123,4 +96,4 @@ ACE_Profile_Timer::~ACE_Profile_Timer () ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +#endif /* defined (ACE_HAS_GETRUSAGE) */ diff --git a/ACE/ace/README b/ACE/ace/README index b4268012d18..99d94841674 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -20,9 +20,6 @@ ACE_HAS_DUMP Used to enable the dump() out in order to reduce footprint. By default, it is not defined. -ACE_CAST_CONST Used to work around broken - SunCC ANSI casts that require - an extra const. ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES Win32 only. Users want to use a predefined security @@ -148,7 +145,6 @@ ACE_THREAD_MANAGER_USES_SAFE_SPAWN Disable the "check before lock" feature on platforms with aggressive read/write reordering. ACE_HAS_CPU_SET_T Platform delivers cpu_set_t. -ACE_HAS_PRIOCNTL OS has priocntl (2). ACE_HAS_RECURSIVE_MUTEXES Mutexes are inherently recursive (e.g., Win32) ACE_HAS_NONRECURSIVE_MUTEXES In addition to recursive mutexes, @@ -215,10 +211,6 @@ ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the ACE_HAS_BROKEN_NESTED_TEMPLATES MSVC has trouble with defining STL containers for nested structs and classes -ACE_HAS_BROKEN_T_ERROR Compiler/platform has the wrong - prototype for t_error(), i.e., - t_error(char *) rather than - t_error(const char *). ACE_HAS_BYTESEX_H Platform has <bytesex.h>. ACE_HAS_CANCEL_IO Platform supports the Win32 CancelIO() function (WinNT 4.0 @@ -278,8 +270,6 @@ ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT Optimize ACE_HAS_LLSEEK Platform supports llseek. ACE_HAS_HI_RES_TIMER Compiler/platform supports SunOS high resolution timers -ACE_HAS_IDTYPE_T Compiler/platform supports - idtype_t. ACE_HAS_INLINED_OSCALLS Inline all the static class OS methods to remove call overhead @@ -287,8 +277,6 @@ ACE_HAS_INT_SWAB Platform's swab function has length argument of type int, not ssize_t. ACE_HAS_IP_MULTICAST Platform supports IP multicast ACE_HAS_IPV6 Platform supports IPv6. -ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED gethostbyaddr does not handle - IPv6-mapped-IPv4 addresses ACE_USES_IPV4_IPV6_MIGRATION Enable IPv6 support in ACE on platforms that don't have IPv6 turned on by default. @@ -298,9 +286,6 @@ ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager a static (global) instance. ACE_HAS_THR_KEYDELETE Platform supports thr_keydelete (e.g,. UNIXWARE) -ACE_HAS_THR_MINSTACK Platform calls thr_minstack() - rather than thr_min_stack() - (e.g., Tandem). ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has only two fields. ACE_HAS_LINUX_NPTL Linux platform (with kernel >= 2.6.x) @@ -349,8 +334,7 @@ ACE_HAS_NONCONST_SWAB Platform's swab function has non const src argument ACE_HAS_NONCONST_WRITEV Platform omits const qualifier from iovec parameter in writev() prototype. -ACE_HAS_ONLY_SCHED_OTHER Platform, e.g., Solaris 2.5, - only supports SCHED_OTHER +ACE_HAS_ONLY_SCHED_OTHER Platform, only supports SCHED_OTHER POSIX scheduling policy. ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R Uses ctime_r & asctime_r with only two parameters @@ -376,7 +360,7 @@ ACE_HAS_POSIX_REALTIME_SIGNALS Platform supports POSIX RT signals. constant in <unistd.h>. ACE_HAS_POSIX_SEM Platform supports POSIX real-time semaphores (e.g., - VxWorks and Solaris). Corresponds + VxWorks). Corresponds to _POSIX_SEMAPHORES constant in <unistd.h> ACE_HAS_POSIX_SEM_TIMEOUT Platform supports timed wait operation @@ -388,8 +372,6 @@ ACE_HAS_PROC_FS Platform supports the /proc in <sys/procfs.h> ACE_HAS_POWERPC_TIMER Platform supports PowerPC time-base register. -ACE_HAS_PRUSAGE_T Platform supports the - prusage_t struct ACE_HAS_PTHREADS Platform supports POSIX Pthreads, of one form or another. This macro says the @@ -469,8 +451,6 @@ ACE_HAS_SOCK_BUF_SIZE_MAX Platform limits the maximum socket message size. ACE_HAS_SSIZE_T Compiler supports the ssize_t typedef -ACE_HAS_STHREADS Platform supports Solaris - threads ACE_HAS_STRBUF_T Compiler/platform supports struct strbuf ACE_HAS_STRDUP_EMULATION Use ACE's strdup() emulation (even @@ -494,18 +474,10 @@ ACE_HAS_SVR4_GETTIMEOFDAY Compiler/platform supports SVR4 gettimeofday() prototype ACE_HAS_SVR4_SIGNAL_T Compiler/platform supports SVR4 signal typedef -ACE_HAS_SVR4_TLI Compiler/platform supports - SVR4 TLI; that is, TLI with extensions - like t_getname(). This is sometimes - used as a pseudonym for TLI on SunOS4. - This is a modifier to ACE_HAS_TLI and - isn't used if ACE_HAS_XTI is set. ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall for GETRUSAGE... ACE_HAS_SYSENT_H Platform provides <sysent.h> header -ACE_HAS_SYSV_SYSINFO Platform supports system - configuration information ACE_HAS_SYSV_IPC Platform supports System V IPC (most versions of UNIX, but not Win32) @@ -559,10 +531,6 @@ ACE_HAS_TIMEZONE Platform/compiler supports ACE_HAS_TIMEZONE_GETTIMEOFDAY Platform/compiler supports timezone * as second parameter to gettimeofday() -ACE_HAS_TIMOD_H Platform supports TLI timod - STREAMS module -ACE_HAS_TIUSER_H Platform provides TLI tiuser.h - header file. ACE_HAS_TLI Platform supports TLI. Also see ACE_TLI_TCP_DEVICE. If the platform supports XTI, set ACE_HAS_XTI @@ -772,8 +740,6 @@ ACE_LACKS_PERFECT_MULTICAST_FILTERING Platform lacks IGMPv3 "perfect" filterin socket, and all future joins on that socket will fail with an error. ACE_LACKS_PRAGMA_ONCE Compiler complains about #pragma once -ACE_LACKS_PRI_T Platform lacks pri_t (e.g., - Tandem NonStop UNIX). ACE_LACKS_PTHREAD_CANCEL Platform lacks pthread_cancel(). ACE_LACKS_PTHREAD_SCOPE_PROCESS Platform lacks support for @@ -827,8 +793,6 @@ ACE_LACKS_SETSCHED Platform lacks (e.g. MVS) ACE_LACKS_SIGACTION Platform lacks struct sigaction (e.g., Win32) -ACE_LACKS_SIGNED_CHAR Platform lacks "signed char" - type (broken!) ACE_LACKS_SIGSET Platform lacks signal sets (e.g., Win32) ACE_LACKS_STRPTIME Platform/compiler lacks the strptime() @@ -871,17 +835,6 @@ ACE_LACKS_TELLDIR Platform uses ACE_HAS_DIRENT ACE_LACKS_THREAD_STACK_SIZE Platform lacks pthread_attr_setstacksize() (e.g., Linux pthreads) -ACE_LACKS_THR_CONCURRENCY_FUNCS (ONLY APPLIES TO SOLARIS) - Platform does not support - thr_getconcurrency/thr_setconcurrency - functions, or their implementation - is effectively a "no-op". This - notably applies for Solaris >= 5.9. - Note that if you build on Solaris 8 - and run on Solaris 9+, you can - encounter thread creation errors - unless you rebuild on the target - platform. ACE_LACKS_TIMEDWAIT_PROTOTYPES MIT pthreads platform lacks the timedwait prototypes ACE_LACKS_TIMESPEC_T Platform does not define @@ -889,9 +842,6 @@ ACE_LACKS_TIMESPEC_T Platform does not define struct timespec. ACE_LACKS_TRUNCATE Platform doesn't have truncate() (e.g., vxworks) -ACE_LACKS_UALARM_PROTOTYPE Platform/compiler lacks the - ualarm() prototype (e.g., - Solaris) ACE_LACKS_CHAR_RIGHT_SHIFTS Compiler does not have any istream operator>> for chars, u_chars, or signed chars. @@ -924,16 +874,8 @@ ACE_LACKS_WIN32_SECURITY_DESCRIPTORS The Windows platform doesn't have security descriptor support. ACE_LACKS_WRITEV Platform doesn't define writev, so use our own - -ACE_NEEDS_DEV_IO_CONVERSION Necessary with some compilers - to pass ACE_TTY_IO as - parameter to DEV_Connector. ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with small default stacks. -ACE_NEEDS_LWP_PRIO_SET OS has LWPs, and when the - priority of a bound thread is - set, then the LWP priority - must be set also. ACE_NEEDS_SCHED_H Platform needs to #include <sched.h> to get thread scheduling @@ -1274,19 +1216,6 @@ ACE_HAS_SVR4_SIGNAL_T: #endif /* ACE_HAS_SVR4_SIGNAL_T */ -ACE_HAS_SVR4_TLI: ------------------ - - Used in: - libsrc/IPC_SAP/TLI_SAP/TLI.C - libsrc/IPC_SAP/TLI_SAP/TLI.h - libsrc/IPC_SAP/TLI_SAP/TLI_Stream.C - - Notes: - TLI is the transport layer calls as in: t_bind(), t_open(), t_unbind(), - t_optmgmt(), ... in SunOS and Solaris. - - ACE_HAS_SYS_FILIO_H: -------------------- @@ -1349,24 +1278,6 @@ ACE_HAS_THREADS: our XOMessageList.h does this by #ifdefs around Threaded things. -ACE_HAS_TIMOD_H: ----------------- - - Used in: - ace/OS.h - - Notes: - if defined, include <sys/timod.h> - - Solaris: - timod is a STREAMS module for use with the Transport Inter- - face (TI) functions of the Network Services library. The - timod module converts a set of ioctl(2) calls into STREAMS - messages that may be consumed by a transport protocol pro- - vider that supports the Transport Interface. This allows a - user to initiate certain TI functions as atomic operations. - - ACE_HAS_TIUSER_H: ----------------- diff --git a/ACE/ace/SOCK_SEQPACK_Association.cpp b/ACE/ace/SOCK_SEQPACK_Association.cpp index 4fa2da226f0..700c046f455 100644 --- a/ACE/ace/SOCK_SEQPACK_Association.cpp +++ b/ACE/ace/SOCK_SEQPACK_Association.cpp @@ -90,11 +90,7 @@ ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &siz int err = 0; size_t len = 0; -#ifndef ACE_HAS_VOID_PTR_SCTP_GETLADDRS err = sctp_getladdrs(this->get_handle(), 0, &laddrs); -#else - err = sctp_getladdrs(this->get_handle(), 0, reinterpret_cast<void**>(&laddrs)); -#endif /* ACE_HAS_VOID_PTR_SCTP_GETPADDRS */ if (err > 0) { len = err; diff --git a/ACE/ace/SSL/SSL_Context.h b/ACE/ace/SSL/SSL_Context.h index 97eae945e62..91903f788c3 100644 --- a/ACE/ace/SSL/SSL_Context.h +++ b/ACE/ace/SSL/SSL_Context.h @@ -57,7 +57,7 @@ private: // **************************************************************** -// NOTE: Solaris studio compilers amongst others will issue warnings if the +// NOTE: Some compilers will issue warnings if the // the correct type of function pointer (i.e. extern "C" ) is not stored/used // of the form: // Warning (Anachronism): Formal argument callback of type diff --git a/ACE/ace/SUN_Proactor.cpp b/ACE/ace/SUN_Proactor.cpp deleted file mode 100644 index 6caf2858d67..00000000000 --- a/ACE/ace/SUN_Proactor.cpp +++ /dev/null @@ -1,314 +0,0 @@ -#include "ace/SUN_Proactor.h" - -#if defined (ACE_HAS_AIO_CALLS) && defined (sun) - -#include "ace/Task_T.h" -#include "ace/Log_Category.h" -#include "ace/Object_Manager.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_SUN_Proactor::ACE_SUN_Proactor (size_t max_aio_operations) - : ACE_POSIX_AIOCB_Proactor (max_aio_operations, - ACE_POSIX_Proactor::PROACTOR_SUN), - condition_ (mutex_) -{ - // To provide correct virtual calls. - create_notify_manager (); - - // we should start pseudo-asynchronous accept task - // one per all future acceptors - - this->get_asynch_pseudo_task ().start (); -} - -// Destructor. -ACE_SUN_Proactor::~ACE_SUN_Proactor () -{ - this->close (); -} - -int -ACE_SUN_Proactor::handle_events (ACE_Time_Value &wait_time) -{ - // Decrement <wait_time> with the amount of time spent in the method - ACE_Countdown_Time countdown (&wait_time); - return this->handle_events_i (&wait_time); -} - -int -ACE_SUN_Proactor::handle_events () -{ - return this->handle_events_i (0); -} - -int ACE_SUN_Proactor::wait_for_start (ACE_Time_Value * abstime) -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, mutex_, -1)); - - if (this->num_started_aio_ != 0) // double check - return 0; - - return this->condition_.wait (abstime); - -#else - - return 0; // or -1 ??? - -#endif /* ACE_MT_SAFE */ -} - -int -ACE_SUN_Proactor::handle_events_i (ACE_Time_Value *delta) -{ - int retval = 0; - aio_result_t *result = 0; - - if (0 == delta) - { - if (this->num_started_aio_ == 0) - this->wait_for_start (0); - - result = aiowait (0); - } - else - { - if (this->num_started_aio_ == 0) - { - // Decrement delta with the amount of time spent waiting - ACE_Countdown_Time countdown (delta); - ACE_Time_Value tv (*delta); - tv += ACE_OS::gettimeofday (); - if (this->wait_for_start (&tv) == -1) - return -1; - } - struct timeval delta_tv = *delta; - result = aiowait (&delta_tv); - } - - if (result == 0) - { - // timeout, do nothing, - // we should process "post_completed" queue - } - else if (reinterpret_cast<long> (result) == -1) - { - // Check errno for EINVAL,EAGAIN,EINTR ?? - switch (errno) - { - case EINTR : // aiowait() was interrupted by a signal. - case EINVAL: // there are no outstanding asynchronous I/O requests. - break; // we should process "post_completed" queue - - default: // EFAULT - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT("%N:%l:(%P | %t)::%p \nNumAIO=%d\n"), - ACE_TEXT("ACE_SUN_Proactor::handle_events: aiowait failed"), - num_started_aio_), - -1); - } - } - else - { - int error_status = 0; - size_t transfer_count = 0; - - ACE_POSIX_Asynch_Result *asynch_result = - find_completed_aio (result, - error_status, - transfer_count); - - if (asynch_result != 0) - { - // Call the application code. - this->application_specific_code (asynch_result, - transfer_count, - 0, // No completion key. - error_status); // Error - retval++; - } - } - - // process post_completed results - retval += this->process_result_queue (); - - return retval > 0 ? 1 : 0 ; -} - -int -ACE_SUN_Proactor::get_result_status (ACE_POSIX_Asynch_Result* asynch_result, - int &error_status, - size_t &transfer_count) -{ - // Get the error status of the aio_ operation. - error_status = asynch_result->aio_resultp.aio_errno; - ssize_t op_return = asynch_result->aio_resultp.aio_return; - - // ****** from Sun man pages ********************* - // Upon completion of the operation both aio_return and aio_errno - // are set to reflect the result of the operation. - // AIO_INPROGRESS is not a value used by the system - // so the client may detect a change in state - // by initializing aio_return to this value. - - if (error_status == EINPROGRESS || op_return == AIO_INPROGRESS) - return 0; // not completed - - if (op_return < 0) - transfer_count = 0; // zero bytes transferred - else - transfer_count = static_cast<size_t> (op_return); - - return 1; // completed -} - -ACE_POSIX_Asynch_Result * -ACE_SUN_Proactor::find_completed_aio (aio_result_t *result, - int &error_status, - size_t &transfer_count) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, mutex_, 0)); - - size_t ai; - error_status = -1; - transfer_count = 0; - - // we call find_completed_aio always with result != 0 - - for (ai = 0; ai < aiocb_list_max_size_; ai++) - if (aiocb_list_[ai] != 0 && //check for non zero - result == &aiocb_list_[ai]->aio_resultp) - break; - - if (ai >= aiocb_list_max_size_) // not found - return 0; // means somebody else uses aio directly!!! - - ACE_POSIX_Asynch_Result *asynch_result = result_list_[ai]; - - if (this->get_result_status (asynch_result, - error_status, - transfer_count) == 0) - { // should never be - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT("%N:%l:(%P | %t)::%p\n"), - ACE_TEXT("ACE_SUN_Proactor::find_completed_aio:") - ACE_TEXT("should never be !!!\n"))); - return 0; - } - - aiocb_list_[ai] = 0; - result_list_[ai] = 0; - aiocb_list_cur_size_--; - - num_started_aio_--; - - start_deferred_aio (); - //make attempt to start deferred AIO - //It is safe as we are protected by mutex_ - - return asynch_result; -} - -// start_aio_i has new return codes -// 0 successful start -// 1 try later, OS queue overflow -// -1 invalid request and other errors - -int -ACE_SUN_Proactor::start_aio_i (ACE_POSIX_Asynch_Result *result) -{ - ACE_TRACE ("ACE_SUN_Proactor::start_aio_i"); - - int ret_val; - const ACE_TCHAR *ptype; - - // ****** from Sun man pages ********************* - // Upon completion of the operation both aio_return and aio_errno - // are set to reflect the result of the operation. - // AIO_INPROGRESS is not a value used by the system - // so the client may detect a change in state - // by initializing aio_return to this value. - result->aio_resultp.aio_return = AIO_INPROGRESS; - result->aio_resultp.aio_errno = EINPROGRESS; - - // Start IO - switch (result->aio_lio_opcode) - { - case LIO_READ : - ptype = ACE_TEXT ("read"); - ret_val = aioread (result->aio_fildes, - (char *) result->aio_buf, - result->aio_nbytes, - result->aio_offset, - SEEK_SET, - &result->aio_resultp); - break; - - case LIO_WRITE : - ptype = ACE_TEXT ("write"); - ret_val = aiowrite (result->aio_fildes, - (char *) result->aio_buf, - result->aio_nbytes, - result->aio_offset, - SEEK_SET, - &result->aio_resultp); - break; - - default: - ptype = ACE_TEXT ("?????"); - ret_val = -1; - break; - } - - if (ret_val == 0) - { - this->num_started_aio_++; - if (this->num_started_aio_ == 1) // wake up condition - this->condition_.broadcast (); - } - else // if (ret_val == -1) - { - if (errno == EAGAIN || errno == ENOMEM) // Defer - retry this later. - ret_val = 1; - else - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%N:%l:(%P | %t)::start_aio: aio%s %p\n"), - ptype, - ACE_TEXT ("queueing failed\n"))); - } - - return ret_val; -} - -int -ACE_SUN_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result *result) -{ - ACE_TRACE ("ACE_SUN_Proactor::cancel_aiocb"); - int rc = ::aiocancel (&result->aio_resultp); - if (rc == 0) // AIO_CANCELED - { - // after aiocancel Sun does not notify us - // so we should send notification - // to save POSIX behavoir. - // Also we should do this for deffered aio's - - result->set_error (ECANCELED); - result->set_bytes_transferred (0); - this->putq_result (result); - return 0; - } - - return 2; -} - -ACE_POSIX_Proactor::Proactor_Type -ACE_SUN_Proactor::get_impl_type () -{ - return PROACTOR_SUN; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_AIO_CALLS && sun */ diff --git a/ACE/ace/SUN_Proactor.h b/ACE/ace/SUN_Proactor.h deleted file mode 100644 index 376a9cdf60a..00000000000 --- a/ACE/ace/SUN_Proactor.h +++ /dev/null @@ -1,123 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file SUN_Proactor.h - * - * @author Alexander Libman <alibman@baltimore.com> - */ -//============================================================================= - -#ifndef ACE_SUN_PROACTOR_H -#define ACE_SUN_PROACTOR_H - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_AIO_CALLS) && defined (sun) - -#include "ace/POSIX_Proactor.h" -#include /**/ <sys/asynch.h> // Sun native aio calls - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_SUN_Proactor - * - * @brief Implementation of the fast and reliable Proactor - * for SunOS 5.6, 5.7, etc. - * - * This proactor, based on ACE_POSIX_AIOCB_Proactor, - * works with Sun native interface for aio calls. - * POSIX_API Native SUN_API - * aio_read aioread - * aio_write aiowrite - * aio_suspend aiowait - * aio_error aio_result_t.errno - * aio_return aio_result_t.return - * On Solaris, the Sun <aio*()> native implementation is more - * reliable and efficient than POSIX <aio_*()> implementation. - * There is a problem of lost RT signals with POSIX, if we start - * more than SIGQUEUEMAX asynchronous operations at the same - * time. - * The Sun <aiocb> it is not the standard POSX <aiocb>, instead, - * it has the following structure: - * typedef struct aiocb - * { - * int aio_fildes; File descriptor - * void *aio_buf; buffer location - * size_t aio_nbytes; length of transfer - * off_t aio_offset; file offset - * int aio_reqprio; request priority offset - * sigevent aio_sigevent; signal number and offset - * int aio_lio_opcode; listio operation - * aio_result_t aio_resultp; results - * int aio_state; state flag for List I/O - * int aio__pad[1]; extension padding - * }; - */ -class ACE_Export ACE_SUN_Proactor : public ACE_POSIX_AIOCB_Proactor -{ -public: - virtual Proactor_Type get_impl_type (); - - /// Destructor. - virtual ~ACE_SUN_Proactor (); - - /// Constructor defines max number asynchronous operations that can - /// be started at the same time. - ACE_SUN_Proactor (size_t max_aio_operations = ACE_AIO_DEFAULT_SIZE); - -protected: - /** - * Dispatch a single set of events. If @a wait_time elapses before - * any events occur, return 0. Return 1 on success i.e., when a - * completion is dispatched, non-zero (-1) on errors and errno is - * set accordingly. - */ - virtual int handle_events (ACE_Time_Value &wait_time); - - /** - * Block indefinitely until at least one event is dispatched. - * Dispatch a single set of events. Return 1 on success i.e., when a - * completion is dispatched, non-zero (-1) on errors and errno is - * set accordingly. - */ - virtual int handle_events (); - - /// Internal completion detection and dispatching. - int handle_events_i (ACE_Time_Value *delta); - - /// Initiate an aio operation. - virtual int start_aio_i (ACE_POSIX_Asynch_Result *result); - - /// Check AIO for completion, error and result status - /// Return: 1 - AIO completed , 0 - not completed yet - virtual int get_result_status (ACE_POSIX_Asynch_Result* asynch_result, - int &error_status, - size_t &transfer_count); - - /// Extract the results of aio. - ACE_POSIX_Asynch_Result *find_completed_aio (aio_result_t *result, - int &error_status, - size_t &transfer_count); - - /// From ACE_POSIX_AIOCB_Proactor. - /// Attempt to cancel running request - virtual int cancel_aiocb (ACE_POSIX_Asynch_Result *result); - - /// Specific Sun aiowait - int wait_for_start (ACE_Time_Value * abstime); - - /// Condition variable . - /// used to wait the first AIO start - ACE_SYNCH_CONDITION condition_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_AIO_CALLS && sun */ -#endif /* ACE_SUN_PROACTOR_H*/ diff --git a/ACE/ace/Sched_Params.cpp b/ACE/ace/Sched_Params.cpp index 3c5b3eaa121..409e7120ac5 100644 --- a/ACE/ace/Sched_Params.cpp +++ b/ACE/ace/Sched_Params.cpp @@ -13,73 +13,13 @@ #include "ace/Sched_Params.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) -# include "ace/OS_NS_string.h" -# include /**/ <sys/priocntl.h> -#endif /* ACE_HAS_PRIOCNTL && ACE_HAS_THREADS */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_Sched_Params::priority_min (const Policy policy, const int scope) { -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (scope); - - // Assume that ACE_SCHED_OTHER indicates TS class, and that other - // policies indicate RT class. - - // Call ACE_OS::priority_control only for processes (lightweight - // or otherwise). Calling ACE_OS::priority_control for thread - // priorities gives incorrect results. - if (scope == ACE_SCOPE_PROCESS || scope == ACE_SCOPE_LWP) - { - if (policy == ACE_SCHED_OTHER) - { - // Get the priority class ID and attributes. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - ACE_OS::strcpy (pcinfo.pc_clname, "TS"); - - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - // Just hope that priority range wasn't configured from -1 - // .. 1 - return -1; - - // OK, now we've got the class ID in pcinfo.pc_cid. In - // addition, the maximum configured time-share priority is in - // ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri. The minimum - // priority is just the negative of that. - - return -((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri; - } - else - return 0; - } - else - { - // Here we handle the case for ACE_SCOPE_THREAD. Calling - // ACE_OS::priority_control for thread scope gives incorrect - // results. - switch (policy) - { - case ACE_SCHED_FIFO: - return ACE_THR_PRI_FIFO_MIN; - case ACE_SCHED_RR: - return ACE_THR_PRI_RR_MIN; - case ACE_SCHED_OTHER: - default: - return ACE_THR_PRI_OTHER_MIN; - } - } -#elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED)) +#if defined(ACE_HAS_PTHREADS) && !defined(ACE_LACKS_SETSCHED) switch (scope) { case ACE_SCOPE_THREAD: @@ -124,63 +64,14 @@ ACE_Sched_Params::priority_min (const Policy policy, ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */ +#endif /* ACE_HAS_PTHREADS */ } int ACE_Sched_Params::priority_max (const Policy policy, const int scope) { -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (scope); - - // Call ACE_OS::priority_control only for processes (lightweight - // or otherwise). Calling ACE_OS::priority_control for thread - // priorities gives incorrect results. - if (scope == ACE_SCOPE_PROCESS || scope == ACE_SCOPE_LWP) - { - // Assume that ACE_SCHED_OTHER indicates TS class, and that other - // policies indicate RT class. - - // Get the priority class ID and attributes. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - ACE_OS::strcpy (pcinfo.pc_clname, - policy == ACE_SCHED_OTHER ? "TS" : "RT"); - - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - return -1; - - // OK, now we've got the class ID in pcinfo.pc_cid. In addition, - // the maximum configured real-time priority is in ((rtinfo_t *) - // pcinfo.pc_clinfo)->rt_maxpri, or similarly for the TS class. - - return policy == ACE_SCHED_OTHER - ? ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri - : ((rtinfo_t *) pcinfo.pc_clinfo)->rt_maxpri; - } - else - { - // Here we handle the case for ACE_SCOPE_THREAD. Calling - // ACE_OS::priority_control for thread scope gives incorrect - // results. - switch (policy) - { - case ACE_SCHED_FIFO: - return ACE_THR_PRI_FIFO_MAX; - case ACE_SCHED_RR: - return ACE_THR_PRI_RR_MAX; - case ACE_SCHED_OTHER: - default: - return ACE_THR_PRI_OTHER_MAX; - } - } -#elif defined(ACE_HAS_PTHREADS) && \ +#if defined(ACE_HAS_PTHREADS) && \ (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) @@ -228,7 +119,7 @@ ACE_Sched_Params::priority_max (const Policy policy, ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */ +#endif /* ACE_HAS_PTHREADS */ } int diff --git a/ACE/ace/Sched_Params.h b/ACE/ace/Sched_Params.h index 7ca200bbf46..5058f17e60a 100644 --- a/ACE/ace/Sched_Params.h +++ b/ACE/ace/Sched_Params.h @@ -36,10 +36,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * (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. + * applies to the current process, or current thread. Please + * see the "NOTE" 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 @@ -57,11 +56,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL */ class ACE_Export ACE_Sched_Params { - // 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 - // 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 @@ -142,8 +136,6 @@ private: * process, and the process priority. On some platforms, * such as Win32, the scheduling policy can _only_ be * set at process scope. - * ACE_SCOPE_LWP: lightweight process scope, only used with - * Solaris threads. * ACE_SCOPE_THREAD: sets the scheduling policy for the thread, * if the OS supports it, such as with Posix threads, and the * thread priority. diff --git a/ACE/ace/Semaphore.h b/ACE/ace/Semaphore.h index fc46aac8a64..a0c6f964dd6 100644 --- a/ACE/ace/Semaphore.h +++ b/ACE/ace/Semaphore.h @@ -60,13 +60,6 @@ public: * is assumed to be in "absolute" rather than "relative" time. The * value of @a tv is updated upon return to show the actual * (absolute) acquisition time. - * - * @note Solaris threads do not support timed semaphores. - * Therefore, if you're running on Solaris you might want to - * consider using the ACE POSIX pthreads implementation instead, - * which can be enabled by compiling ACE with - * -DACE_HAS_PTHREADS, rather than -DACE_HAS_STHREADS or - * -DACE_HAS_POSIX_SEM. */ int acquire (ACE_Time_Value &tv); @@ -78,13 +71,7 @@ public: * <*tv> is assumed to be in "absolute" rather than "relative" time. * The value of <*tv> is updated upon return to show the actual * (absolute) acquisition time. - * - * @note Solaris threads do not support timed semaphores. - * Therefore, if you're running on Solaris you might want to - * consider using the ACE POSIX pthreads implementation instead, - * which can be enabled by compiling ACE with - * -DACE_HAS_PTHREADS, rather than -DACE_HAS_STHREADS or - * -DACE_HAS_POSIX_SEM. */ + */ int acquire (ACE_Time_Value *tv); /** diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp index ba2e255e3cf..37e8ea1a339 100644 --- a/ACE/ace/Sock_Connect.cpp +++ b/ACE/ace/Sock_Connect.cpp @@ -7,11 +7,6 @@ #include "ace/OS_Memory.h" #include "ace/OS_NS_stdio.h" #include "ace/ACE.h" - -#if defined (sparc) -# include "ace/OS_NS_fcntl.h" -#endif // sparc - #include "ace/OS_NS_stdlib.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_sys_socket.h" @@ -1062,22 +1057,17 @@ return 0; } // Routine to return a handle from which ioctl() requests can be made. - ACE_HANDLE ACE::get_handle () { - // Solaris 2.x ACE_HANDLE handle = ACE_INVALID_HANDLE; -#if defined (sparc) - handle = ACE_OS::open ("/dev/udp", O_RDONLY); -#elif defined (__unix) || defined (__unix__) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) +#if defined (__unix) || defined (__unix__) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) // Note: DEC CXX doesn't define "unix" BSD compatible OS: SunOS 4.x handle = ACE_OS::socket (PF_INET, SOCK_DGRAM, 0); -#endif /* sparc */ +#endif /* __unux */ return handle; } - #if defined (ACE_HAS_IPV6) static int ip_check (int &ipvn_enabled, int pf) diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index dd1f0efa535..52e994cf471 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -10,9 +10,6 @@ * and is adapted from examples shown in relevant documentation * and repeated elsewhere, e.g., * http://www.linuxselfhelp.com/gnu/glibc/html_chapter/libc_33.html - * - the Solaris stack generation is adapted from a 1995 post on - * comp.unix.solaris by Bart Smaalders, - * http://groups.google.com/group/comp.unix.solaris/browse_thread/thread/8b9f3de8be288f1c/31550f93a48231d5?lnk=gst&q=how+to+get+stack+trace+on+solaris+group:comp.unix.solaris#31550f93a48231d5 * - VxWorks kernel-mode stack tracing is adapted from a code example * in the VxWorks FAQ at http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt5.html * although the undocumented functions it uses are also mentioned in @@ -302,157 +299,6 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, pc = prevPc; } } - -#elif defined(sun) -/* - * walks up call stack, printing library:routine+offset for each routine - */ - -# include <dlfcn.h> -# include <setjmp.h> -# include <sys/types.h> -# include <sys/reg.h> -# include <sys/frame.h> -# define ACE_STACK_TRACE_BIAS 0 - -# if defined(sparc) || defined(__sparc) -# define ACE_STACK_TRACE_FLUSHWIN() asm("ta 3"); -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 1 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# if defined(__sparcv9) -# undef ACE_STACK_TRACE_BIAS -# define ACE_STACK_TRACE_BIAS 2047 -# endif -# endif - -# if defined(i386) || defined(__i386) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 3 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# endif - -# if defined(__amd64) || defined(__x86_64) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 5 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# endif - -# if defined(ppc) || defined(__ppc) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 0 -# define ACE_STACK_TRACE_SKIP_FRAMES 2 -# endif - -static frame* -cs_frame_adjust(frame* sp) -{ - unsigned char* sp_byte = (unsigned char*)sp; - sp_byte += ACE_STACK_TRACE_BIAS; - return (frame*) sp_byte; -} - -/* - this function walks up call stack, calling user-supplied - function once for each stack frame, passing the pc and the user-supplied - usrarg as the argument. - */ - -static int -cs_operate(int (*func)(void *, void *), void * usrarg, - size_t starting_frame, size_t num_frames_arg) -{ - ACE_STACK_TRACE_FLUSHWIN(); - - jmp_buf env; - setjmp(env); - frame* sp = cs_frame_adjust((frame*) env[ACE_STACK_TRACE_FRAME_PTR_INDEX]); - - // make a copy of num_frames_arg to eliminate the following warning on some - // solaris platforms: - // Stack_Trace.cpp:318: warning: argument `size_t num_frames' might be clobbered by `longjmp' or `vfork' - size_t num_frames = num_frames_arg; - - // I would like to use ACE_MAX below rather than ?:, but - // I get linker relocation errors such as the following when - // I use it: - // ld: fatal: relocation error: file: .shobj/Stack_Trace.o section: - // .rela.debug_line symbol: : relocation against a discarded symbol, - // symbol is part of discarded section: - // .text%const __type_0&ace_max<unsig\ned>(const __type_0&,const __type_0&) - // - const size_t starting_skip = starting_frame - 1; -#if ACE_STACK_TRACE_SKIP_FRAMES == 0 - size_t skip_frames = starting_skip; -#else - size_t skip_frames = - ACE_STACK_TRACE_SKIP_FRAMES > starting_skip ? - ACE_STACK_TRACE_SKIP_FRAMES : starting_skip; -#endif /* ACE_STACK_TRACE_SKIP_FRAMES == 0 */ - size_t i; - for (i = 0; i < skip_frames && sp; ++i) - { - sp = cs_frame_adjust((frame*) sp->fr_savfp); - } - - i = 0; - - while ( sp - && sp->fr_savpc - && ++i - && --num_frames - && (*func)((void*)sp->fr_savpc, usrarg)) - { - sp = cs_frame_adjust((frame*) sp->fr_savfp); - } - - return(i); -} - -static int -add_frame_to_buf (void* pc, void* usrarg) -{ - char* buf = (char*)usrarg; - Dl_info info; - const char* func = "??"; - const char* lib = "??"; - - if(dladdr(pc, & info) != 0) - { - lib = (const char *) info.dli_fname; - func = (const char *) info.dli_sname; - } - - (void) ACE_OS::snprintf(buf, - ACE_Stack_Trace::SYMBUFSIZ, - "%s%s:%s+0x%x\n", - buf, - lib, - func, - //@@ Should the arithmetic on the following - //line be done with two void* ptrs? The result - //would be ptrdiff_t, and what is the correct - //sprintf() conversion character for that? - (size_t)pc - (size_t)info.dli_saddr); - - return(1); -} - -void -ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, - size_t num_frames) -{ - const size_t MAX_FRAMES = 128; - const ssize_t INITIAL_FRAME = 3; - - if (num_frames == 0) - num_frames = MAX_FRAMES; - - size_t starting_frame = - determine_starting_frame (INITIAL_FRAME, starting_frame_offset); - - cs_operate (&add_frame_to_buf, &this->buf_[0], starting_frame, num_frames); -} - #elif defined(ACE_WIN64) && (_WIN32_WINNT <= _WIN32_WINNT_WIN2K) # if defined(_MSC_VER) # define STRING2(X) #X diff --git a/ACE/ace/Stack_Trace.h b/ACE/ace/Stack_Trace.h index dce77355f45..476319e22cc 100644 --- a/ACE/ace/Stack_Trace.h +++ b/ACE/ace/Stack_Trace.h @@ -52,7 +52,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * - Any platform using glibc as its runtime library, or where ACE_HAS_EXECINFO_H is defined * (this covers Linux and Mac) and gcc version >= 3.3. * - VxWorks, both kernel and RTP - * - Solaris * - Windows 32 and 64 bit (Visual C++) * * @note Since stack trace buffer size has limitation(@c ACE_STACK_TRACE_SYMBUFSIZ), you will not diff --git a/ACE/ace/TLI.cpp b/ACE/ace/TLI.cpp index 1aeafeeb68a..d0fbd289f3c 100644 --- a/ACE/ace/TLI.cpp +++ b/ACE/ace/TLI.cpp @@ -30,25 +30,6 @@ ACE_TLI::dump () const ACE_TLI::ACE_TLI () { ACE_TRACE ("ACE_TLI::ACE_TLI"); -#if defined (ACE_HAS_SVR4_TLI) -// Solaris 2.4 ACE_TLI option handling is broken. Thus, we must do -// the memory allocation ourselves... Thanks to John P. Hearn -// (jph@ccrl.nj.nec.com) for the help. - - this->so_opt_req.opt.maxlen = sizeof (opthdr) + sizeof (long); - ACE_NEW (this->so_opt_req.opt.buf, - char[this->so_opt_req.opt.maxlen]); - - this->so_opt_ret.opt.maxlen = sizeof (opthdr) + sizeof (long); - ACE_NEW (this->so_opt_ret.opt.buf, - char[this->so_opt_ret.opt.maxlen]); - - if (this->so_opt_ret.opt.buf == 0) - { - delete [] this->so_opt_req.opt.buf; - this->so_opt_req.opt.buf = 0; - } -#endif /* ACE_HAS_SVR4_TLI */ } ACE_HANDLE @@ -65,15 +46,6 @@ ACE_TLI::open (const char device[], int oflag, struct t_info *info) ACE_TLI::~ACE_TLI () { ACE_TRACE ("ACE_TLI::~ACE_TLI"); -#if defined (ACE_HAS_SVR4_TLI) - if (this->so_opt_req.opt.buf) - { - delete [] this->so_opt_req.opt.buf; - delete [] this->so_opt_ret.opt.buf; - this->so_opt_req.opt.buf = 0; - this->so_opt_ret.opt.buf = 0; - } -#endif /* ACE_HAS_SVR4_TLI */ } ACE_TLI::ACE_TLI (const char device[], int oflag, struct t_info *info) @@ -147,35 +119,13 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen) opthdr->len = req.opt.len; // We only request one option at a time. ACE_OS::memcpy (&opthdr[1], optval, optlen); return ACE_OS::t_optmgmt (this->get_handle (), &req, &ret); - -#elif defined (ACE_HAS_SVR4_TLI) - struct opthdr *opthdr = 0; /* See <sys/socket.h> for info on this format */ - - this->so_opt_req.flags = T_NEGOTIATE; - this->so_opt_req.opt.len = sizeof *opthdr + OPTLEN (optlen); - - if (this->so_opt_req.opt.len > this->so_opt_req.opt.maxlen) - { - t_errno = TBUFOVFLW; - return -1; - } - - opthdr = reinterpret_cast<struct opthdr *> (this->so_opt_req.opt.buf); - opthdr->level = level; - opthdr->name = option; - opthdr->len = OPTLEN (optlen); - ACE_OS::memcpy (OPTVAL (opthdr), optval, optlen); - - return ACE_OS::t_optmgmt (this->get_handle (), - &this->so_opt_req, - &this->so_opt_ret); #else ACE_UNUSED_ARG (level); ACE_UNUSED_ARG (option); ACE_UNUSED_ARG (optval); ACE_UNUSED_ARG (optlen); return -1; -#endif /* ACE_HAS_XTI, else ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } int @@ -222,37 +172,13 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen) return 0; } } - -#elif defined (ACE_HAS_SVR4_TLI) - struct opthdr *opthdr = 0; /* See <sys/socket.h> for details on this format */ - - this->so_opt_req.flags = T_CHECK; - this->so_opt_ret.opt.len = sizeof *opthdr + OPTLEN (optlen); - - if (this->so_opt_ret.opt.len > this->so_opt_ret.opt.maxlen) - { - t_errno = TBUFOVFLW; - return -1; - } - - opthdr = (struct opthdr *) this->so_opt_req.opt.buf; - opthdr->level = level; - opthdr->name = option; - opthdr->len = OPTLEN (optlen); - if (ACE_OS::t_optmgmt (this->get_handle (), &this->so_opt_req, &this->so_opt_ret) == -1) - return -1; - else - { - ACE_OS::memcpy (optval, OPTVAL (opthdr), optlen); - return 0; - } #else ACE_UNUSED_ARG (level); ACE_UNUSED_ARG (option); ACE_UNUSED_ARG (optval); ACE_UNUSED_ARG (optlen); return -1; -#endif /* ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TLI.h b/ACE/ace/TLI.h index bfa0e19584c..006b3a95a51 100644 --- a/ACE/ace/TLI.h +++ b/ACE/ace/TLI.h @@ -93,13 +93,6 @@ protected: /// Initialize a TLI endpoint. ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0); - -private: -#if defined (ACE_HAS_SVR4_TLI) - // XTI/TLI option management. - struct t_optmgmt so_opt_req; - struct t_optmgmt so_opt_ret; -#endif /* ACE_HAS_SVR4_TLI */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TLI_Connector.cpp b/ACE/ace/TLI_Connector.cpp index c8781000a78..5a8fe11bd0c 100644 --- a/ACE/ace/TLI_Connector.cpp +++ b/ACE/ace/TLI_Connector.cpp @@ -221,7 +221,7 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, { if (remote_sap != 0) { -#if defined (ACE_HAS_XTI) || defined (ACE_HAS_SVR4_TLI) +#if defined (ACE_HAS_XTI) struct netbuf name; name.maxlen = remote_sap->get_size (); @@ -230,9 +230,9 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, if (ACE_OS::t_getname (new_stream.get_handle (), &name, REMOTENAME) == -1) -#else /* SunOS4 */ +#else /* ACE_HAS_XTI */ if (0) -#endif /* ACE_HAS_XTI || ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ { new_stream.close (); return -1; diff --git a/ACE/ace/TTY_IO.cpp b/ACE/ace/TTY_IO.cpp index e18f5e6d107..f94aa9e98c5 100644 --- a/ACE/ace/TTY_IO.cpp +++ b/ACE/ace/TTY_IO.cpp @@ -724,11 +724,4 @@ int ACE_TTY_IO::control (Control_Mode cmd, Serial_Params *arg) const #endif /* ACE_HAS_TERMIOS || ACE_HAS_TERMIO */ } -#if defined (ACE_NEEDS_DEV_IO_CONVERSION) -ACE_TTY_IO::operator ACE_DEV_IO &() -{ - return static_cast<ACE_DEV_IO &>(*this); -} -#endif /* ACE_NEEDS_DEV_IO_CONVERSION */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TTY_IO.h b/ACE/ace/TTY_IO.h index 323e310f78c..45ea6601b2d 100644 --- a/ACE/ace/TTY_IO.h +++ b/ACE/ace/TTY_IO.h @@ -104,11 +104,6 @@ public: /** Interface for reading/writing serial device parameters. */ int control (Control_Mode cmd, Serial_Params *arg) const; - -#if defined (ACE_NEEDS_DEV_IO_CONVERSION) - /** This is necessary to pass ACE_TTY_IO as parameter to DEV_Connector. */ - operator ACE_DEV_IO &(); -#endif /* ACE_NEEDS_DEV_IO_CONVERSION */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Thread.h b/ACE/ace/Thread.h index 67a190dcc41..6e79266bb1c 100644 --- a/ACE/ace/Thread.h +++ b/ACE/ace/Thread.h @@ -40,7 +40,7 @@ struct cancel_state * @brief Provides a wrapper for threads. * * This class provides a common interface that is mapped onto - * POSIX Pthreads, Solaris threads, Win32 threads, VxWorks + * POSIX Pthreads, Win32 threads, VxWorks * threads, or pSoS threads. Note, however, that it is * generally a better idea to use the ACE_Thread_Manager * programming API rather than the <ACE_Thread> API since the @@ -152,7 +152,6 @@ public: * If @a thread_id is 0, join() waits for any * undetached thread in the process to terminate * on platforms that support this capability - * (for example, Solaris). * @param departed points to a location that is set to the ID of the * terminated thread if join() returns successfully. * If @a departed is 0, it is ignored. diff --git a/ACE/ace/Thread_Adapter.cpp b/ACE/ace/Thread_Adapter.cpp index ec43c7bc2d9..d72d0d2d010 100644 --- a/ACE/ace/Thread_Adapter.cpp +++ b/ACE/ace/Thread_Adapter.cpp @@ -112,22 +112,6 @@ ACE_Thread_Adapter::invoke_i () // not to access <this> anywhere below this point. delete this; -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // On SunOS, the LWP priority needs to be set in order to get - // preemption when running in the RT class. This is the ACE way to - // do that . . . - ACE_hthread_t thr_handle; - ACE_OS::thr_self (thr_handle); - int prio; - - // thr_getprio () on the current thread should never fail. - ACE_OS::thr_getprio (thr_handle, prio); - - // ACE_OS::thr_setprio () has the special logic to set the LWP priority, - // if running in the RT class. - ACE_OS::thr_setprio (prio); - -#endif /* ACE_NEEDS_LWP_PRIO_SET */ if (cancel_flags != 0) { // If both flags are set, ignore this. diff --git a/ACE/ace/Thread_Manager.inl b/ACE/ace/Thread_Manager.inl index c6c93f270ee..386e7f67711 100644 --- a/ACE/ace/Thread_Manager.inl +++ b/ACE/ace/Thread_Manager.inl @@ -162,7 +162,7 @@ ACE_INLINE ACE_Thread_Descriptor * ACE_Thread_Descriptor::get_next () const { ACE_TRACE ("ACE_Thread_Descriptor::get_next"); - return static_cast<ACE_Thread_Descriptor * ACE_CAST_CONST> (this->next_); + return static_cast<ACE_Thread_Descriptor *> (this->next_); } // Reset this thread descriptor diff --git a/ACE/ace/Thread_Mutex.h b/ACE/ace/Thread_Mutex.h index 3793c5654ed..54292b630c2 100644 --- a/ACE/ace/Thread_Mutex.h +++ b/ACE/ace/Thread_Mutex.h @@ -38,7 +38,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * in the same process. It maps to <CRITICAL_SECTION>s on NT * and <ACE_mutex_t> with <type> set to <USYNC_THREAD> on UNIX. * ACE_Thread_Mutex is recursive on some platforms (like - * Win32). However, on most platforms (like Solaris) it is not + * Win32). However, on most platforms it is not * recursive. To be totally safe and portable, developers * should use ACE_Recursive_Thread_Mutex when they need a * recursive mutex. diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp index d69bfd24f27..f6c3857ca7e 100644 --- a/ACE/ace/Timer_Queue_Adapters.cpp +++ b/ACE/ace/Timer_Queue_Adapters.cpp @@ -233,11 +233,6 @@ ACE_Thread_Timer_Queue_Adapter<TQ, TYPE>::svc () this->thr_id_ = ACE_Thread::self (); // Thread cancellation point, if ACE supports it. - // - // Note: This call generates a warning under Solaris because the header - // file /usr/include/pthread.h redefines the routine argument. This - // is a bug in the Solaris header files and has nothing to do with - // ACE. # if !defined (ACE_LACKS_PTHREAD_CANCEL) ACE_PTHREAD_CLEANUP_PUSH (&this->condition_.mutex ().get_nesting_mutex ()); # endif /* ACE_LACKS_PTHREAD_CANCEL */ diff --git a/ACE/ace/Timer_Queue_T.cpp b/ACE/ace/Timer_Queue_T.cpp index 923cae1b7b8..52ed9ad9c80 100644 --- a/ACE/ace/Timer_Queue_T.cpp +++ b/ACE/ace/Timer_Queue_T.cpp @@ -21,8 +21,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// This fudge factor can be overriden for timers that need it, such as on -// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config +// This fudge factor can be overriden for timers that need it +// by defining the ACE_TIMER_SKEW symbol in the appropriate config // header. #if !defined (ACE_TIMER_SKEW) # define ACE_TIMER_SKEW 0 diff --git a/ACE/ace/Token.h b/ACE/ace/Token.h index 909c25c3cb5..4c3bcc80b5a 100644 --- a/ACE/ace/Token.h +++ b/ACE/ace/Token.h @@ -56,8 +56,8 @@ class ACE_Time_Value; * <acquire> multiple times, however, it must call <release> an * equal number of times before the token is actually released. * Threads that are blocked awaiting the token are serviced in - * strict FIFO/LIFO order as other threads release the token (Solaris - * and Pthread mutexes don't strictly enforce an acquisition + * strict FIFO/LIFO order as other threads release the token + * (Pthread mutexes don't strictly enforce an acquisition * order). There are two lists within the class. Write * acquires always have higher priority over read acquires. Which * means, if you use both write/read operations, care must be diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc index df4d022fbdd..97e8b5fec64 100644 --- a/ACE/ace/ace.mpc +++ b/ACE/ace/ace.mpc @@ -24,7 +24,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, ATM_QoS.cpp ATM_Stream.cpp Atomic_Op.cpp - Atomic_Op_Sparc.c Barrier.cpp Base_Thread_Adapter.cpp Based_Pointer_Repository.cpp @@ -244,7 +243,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, Stack_Trace.cpp Stats.cpp String_Base_Const.cpp - SUN_Proactor.cpp SV_Message.cpp SV_Message_Queue.cpp SV_Semaphore_Complex.cpp diff --git a/ACE/ace/config-cygwin32.h b/ACE/ace/config-cygwin32.h index 29569a216fe..18544fcd08d 100644 --- a/ACE/ace/config-cygwin32.h +++ b/ACE/ace/config-cygwin32.h @@ -84,7 +84,6 @@ #define ACE_HAS_VOIDPTR_MMAP #define ACE_HAS_POLL #define ACE_HAS_SOCKADDR_MSG_NAME 1 -#define ACE_LACKS_PRI_T 1 // Compiler/platform supports alloca(). // Although ACE does have alloca() on this compiler/platform combination, it is diff --git a/ACE/ace/config-hurd.h b/ACE/ace/config-hurd.h index ef78e596b37..95517b69d86 100644 --- a/ACE/ace/config-hurd.h +++ b/ACE/ace/config-hurd.h @@ -59,7 +59,6 @@ #endif /* __GLIBC__ */ #define ACE_HAS_LSEEK64 -//#define ACE_LACKS_LSEEK64_PROTOTYPE #define ACE_HAS_P_READ_WRITE // Use ACE's alternate cuserid() implementation since the use of the diff --git a/ACE/ace/config-kfreebsd.h b/ACE/ace/config-kfreebsd.h index a4387fbd5e7..db57811bcfe 100644 --- a/ACE/ace/config-kfreebsd.h +++ b/ACE/ace/config-kfreebsd.h @@ -359,9 +359,6 @@ /* Compiler complains about use of obsolete "pragma once" */ #define ACE_LACKS_PRAGMA_ONCE 1 -/* Define to 1 if the system lacks the type 'pri_t'. */ -#define ACE_LACKS_PRI_T 1 - /* Define to 1 if platform lacks pthread_thr_sigsetmask(). */ #define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1 diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h index 2e22623bd76..1f2234d0b64 100644 --- a/ACE/ace/config-linux-common.h +++ b/ACE/ace/config-linux-common.h @@ -57,8 +57,6 @@ # include "ace/config-icc-common.h" #elif defined (__GNUG__) # include "ace/config-g++-common.h" -#elif defined (__SUNCC_PRO) || defined (__SUNPRO_CC) -# include "ace/config-suncc-common.h" #elif defined (__PGI) // Portable group compiler # define ACE_LACKS_SWAB diff --git a/ACE/ace/config-lite.h b/ACE/ace/config-lite.h index 9fcc12c2a6b..87d168f2504 100644 --- a/ACE/ace/config-lite.h +++ b/ACE/ace/config-lite.h @@ -91,57 +91,6 @@ typedef ACE_OS_Thread_Descriptor *(*ACE_THR_DESC_LOG_MSG_HOOK) (); ACE_END_VERSIONED_NAMESPACE_DECL -/** - * @deprecated ACE_DECLARE_STL_REVERSE_ITERATORS is a crutch to be - * used until all C++ compiler supported by ACE support - * the standard reverse_iterator adapters. - * @internal ACE_DECLARE_STL_REVERSE_ITERATORS is not meant for use - * outside of ACE. - */ -// STL reverse_iterator declaration generator -// Make sure you include <iterator> in the file you're using this -// generator, and that the following traits are available: -// -// iterator -// const_iterator -// value_type -// reference -// pointer -// const_reference -// const_pointer -// difference_type -// -// Once all C++ compilers support the standard reverse_iterator -// adapters, we can drop this generator macro or at least drop the -// MSVC++ or Sun Studio preprocessor conditional blocks. -#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x5140 \ - && !defined (_STLPORT_VERSION) - // If we're not using the stlport4 C++ library (which has standard - // iterators), we need to ensure this is included in order to test - // the _RWSTD_NO_CLASS_PARTIAL_SPEC feature test macro below. -# include <Cstd/stdcomp.h> -#endif /* __SUNPRO_CC <= 0x5110 */ -#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x5140 \ - && defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) -# define ACE_DECLARE_STL_REVERSE_ITERATORS \ - typedef std::reverse_iterator<iterator, \ - std::input_iterator_tag, \ - value_type, \ - reference, \ - pointer, \ - difference_type> reverse_iterator; \ - typedef std::reverse_iterator<const_iterator, \ - std::input_iterator_tag, \ - value_type const, \ - const_reference, \ - const_pointer, \ - difference_type> const_reverse_iterator; -#else -# define ACE_DECLARE_STL_REVERSE_ITERATORS \ - typedef std::reverse_iterator<iterator> reverse_iterator; \ - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -#endif /* _MSC_VER && _WIN64 */ - #include /**/ "ace/post.h" #endif /* ACE_CONFIG_LITE_H */ diff --git a/ACE/ace/config-macosx-jaguar.h b/ACE/ace/config-macosx-jaguar.h index 76a0df0c9dd..fb8dfd775b9 100644 --- a/ACE/ace/config-macosx-jaguar.h +++ b/ACE/ace/config-macosx-jaguar.h @@ -25,8 +25,6 @@ #define ACE_HAS_GPERF #define ACE_HAS_POSIX_SEM -//#define ACE_HAS_SVR4_TLI - #define ACE_LACKS_STROPTS_H #define ACE_LACKS_WCHAR_H diff --git a/ACE/ace/config-macosx-panther.h b/ACE/ace/config-macosx-panther.h index d4ce6f41619..2eb6c3c68fd 100644 --- a/ACE/ace/config-macosx-panther.h +++ b/ACE/ace/config-macosx-panther.h @@ -26,8 +26,6 @@ #define ACE_HAS_GPERF #define ACE_HAS_POSIX_SEM -//#define ACE_HAS_SVR4_TLI - #define ACE_LACKS_STROPTS_H #define ACE_LACKS_WCHAR_H diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index bb67f3df98d..144e0283d98 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -84,7 +84,7 @@ // Perfect Multicast filtering refers to RFC 3376, where a socket is only // delivered dgrams for groups joined even if it didn't bind the group // address. We turn this option off by default, although most OS's -// except for Windows and Solaris probably lack perfect filtering. +// except for Windows probably lack perfect filtering. // ========================================================================= # if !defined (ACE_LACKS_PERFECT_MULTICAST_FILTERING) @@ -233,17 +233,6 @@ # define ACE_sap_any_cast(TYPE) reinterpret_cast<TYPE> (const_cast<ACE_Addr &> (ACE_Addr::sap_any)) -# if !defined (ACE_CAST_CONST) - // Sun CC 4.2, for example, requires const in reinterpret casts of - // data members in const member functions. But, other compilers - // complain about the useless const. This keeps everyone happy. -# if defined (__SUNPRO_CC) -# define ACE_CAST_CONST const -# else /* ! __SUNPRO_CC */ -# define ACE_CAST_CONST -# endif /* ! __SUNPRO_CC */ -# endif /* ! ACE_CAST_CONST */ - // ============================================================================ // Compiler Silencing macros // diff --git a/ACE/ace/config-netbsd.h b/ACE/ace/config-netbsd.h index 85c0da476d9..5caba73a4a4 100644 --- a/ACE/ace/config-netbsd.h +++ b/ACE/ace/config-netbsd.h @@ -94,7 +94,6 @@ #define ACE_LACKS_MUTEXATTR_PSHARED 1 #define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS 1 #define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#define ACE_LACKS_PRI_T 1 #define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1 #define ACE_LACKS_PTHREAD_YIELD 1 #define ACE_LACKS_RWLOCKATTR_PSHARED 1 diff --git a/ACE/ace/config-sunos5.10.h b/ACE/ace/config-sunos5.10.h deleted file mode 100644 index 94d87715332..00000000000 --- a/ACE/ace/config-sunos5.10.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.10 -// (Solaris 10) platforms using the SunC++ 5.x (Sun Studio 8-10), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.9 config, then add any SunOS 5.10 updates below. -#include "ace/config-sunos5.9.h" - -// Solaris 10 can do sem_timedwait() (see ACE_OS::sema_wait). -#define ACE_HAS_POSIX_SEM_TIMEOUT - -#define ACE_HAS_SCANDIR - -// Solaris 10 offers a useable alphasort() unlike previous Solaris versions. -#if defined (ACE_LACKS_ALPHASORT) -# undef ACE_LACKS_ALPHASORT -#endif - -#undef ACE_LACKS_GETADDRINFO -#undef ACE_LACKS_GETNAMEINFO - -// Solaris 10 offers a useable log2() unlike previous Solaris versions. -#if defined (ACE_LACKS_LOG2) -# undef ACE_LACKS_LOG2 -#endif - -// Solaris 10 offers a useable isblank() unlike previous Solaris versions. -#if defined (ACE_LACKS_ISBLANK) -# undef ACE_LACKS_ISBLANK -#endif - -// Solaris 10 delivers pthread_attr_setstack -#if defined (ACE_LACKS_PTHREAD_ATTR_SETSTACK) -# undef ACE_LACKS_PTHREAD_ATTR_SETSTACK -#endif - -// Solaris 10 introduced printf() modifiers for [s]size_t types. -#undef ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII -#define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%zd" -#undef ACE_SIZE_T_FORMAT_SPECIFIER_ASCII -#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%zu" - -// Solaris 10 offers wcstoll() and wcstoull() -#if defined (ACE_LACKS_WCSTOLL) -# undef ACE_LACKS_WCSTOLL -#endif /* ACE_LACKS_WCSTOLL */ -#if defined (ACE_LACKS_WCSTOULL) -# undef ACE_LACKS_WCSTOULL -#endif /* ACE_LACKS_WCSTOULL */ - -#if defined (ACE_HAS_SCTP) && defined (ACE_HAS_LKSCTP) -# define ACE_HAS_VOID_PTR_SCTP_GETLADDRS -# define ACE_HAS_VOID_PTR_SCTP_GETPADDRS -#endif - -#define ACE_HAS_SOLARIS_ATOMIC_LIB - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.11.h b/ACE/ace/config-sunos5.11.h deleted file mode 100644 index 07f8b679f3b..00000000000 --- a/ACE/ace/config-sunos5.11.h +++ /dev/null @@ -1,13 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.11 -// (Solaris 11) platforms using the SunC++ 5.x (Sun Studio 10-12), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.10 config, then add any SunOS 5.11 updates below. -#include "ace/config-sunos5.10.h" - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.4-g++.h b/ACE/ace/config-sunos5.4-g++.h deleted file mode 100644 index 74be0d51147..00000000000 --- a/ACE/ace/config-sunos5.4-g++.h +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.4 -// platforms using the GNU g++ compiler. - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -#include "ace/config-g++-common.h" - -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// Sun has the wrong prototype for sendmsg. -#define ACE_HAS_NONCONST_SENDMSG - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports the POSIX regular expression library -#define ACE_HAS_REGEX - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Compiler/platform supports SunOS high resolution timers. -#define ACE_HAS_HI_RES_TIMER - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Platform lacks pthread_sigaction -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK - -// Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -/* Turn off the following defines if you want to disable threading. */ -// Compile using multi-thread libraries. -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# if !defined (_REENTRANT) -# define _REENTRANT -# endif /* _REENTRANT */ -#endif /* !ACE_MT_SAFE */ - -// Platform supports Solaris threads. -#define ACE_HAS_STHREADS - -// Platform supports threads. -#define ACE_HAS_THREADS - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform supports reentrant functions (i.e., all the POSIX *_r functions). -#define ACE_HAS_REENTRANT_FUNCTIONS - -/* end threading defines */ - -#define ACE_HAS_PRIOCNTL -#define ACE_NEEDS_LWP_PRIO_SET - -// Platform supports TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform supports TLI. -#define ACE_HAS_TLI - -// Use the poll() event demultiplexor rather than select(). -//#define ACE_USE_POLL - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 -#define ACE_HAS_IDTYPE_T -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.4-sunc++-4.x.h b/ACE/ace/config-sunos5.4-sunc++-4.x.h deleted file mode 100644 index 4bcec509c33..00000000000 --- a/ACE/ace/config-sunos5.4-sunc++-4.x.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.4 -// platforms using the SunC++ 4.0.x compiler. - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// Sun has the wrong prototype for sendmsg. -#define ACE_HAS_NONCONST_SENDMSG - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports the POSIX regular expression library. -#define ACE_HAS_REGEX - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Compiler/platform supports SunOS high resolution timers. -#define ACE_HAS_HI_RES_TIMER - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Compiler/platform supports SVR4 signal typedef. -#define ACE_HAS_SVR4_SIGNAL_T - -// Platform lacks pthread_sigaction -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK - -// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -/* Turn off the following defines if you want to disable threading. */ -// Compile using multi-thread libraries. -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -#endif - -// Platform supports Solaris threads. -#define ACE_HAS_STHREADS - -// Platform supports threads. -#define ACE_HAS_THREADS - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform supports reentrant functions (i.e., all the POSIX *_r functions). -#define ACE_HAS_REENTRANT_FUNCTIONS - -/* end threading defines */ - -#define ACE_HAS_PRIOCNTL -#define ACE_NEEDS_LWP_PRIO_SET - -// Reactor detects deadlock -// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION - -// Platform supports ACE_TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports ACE_TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides ACE_TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform supports ACE_TLI. -#define ACE_HAS_TLI - -#define ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_SIGNED_CHAR - -// Use the poll() event demultiplexor rather than select(). -//#define ACE_USE_POLL - -#define ACE_NEEDS_DEV_IO_CONVERSION - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 -#define ACE_HAS_IDTYPE_T - -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h deleted file mode 100644 index 7fc73ca2e75..00000000000 --- a/ACE/ace/config-sunos5.5.h +++ /dev/null @@ -1,336 +0,0 @@ -/* -*- C++ -*- */ -// This configuration file is designed to work for SunOS 5.5 platforms -// using the following compilers: -// * Sun C++ 4.2 and later (including 5.x), patched as noted below -// * g++ -// * Green Hills 1.8.8 and later - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#define ACE_LACKS_STDINT_H - -// alphasort() is present on earlier Solaris versions but is marked as not for -// use on non-BSD systems and not supported for use in applications that use -// system libraries or with multiple threads. So it's mostly useless. -#define ACE_LACKS_ALPHASORT - -// Solaris doesn't support log2() -#define ACE_LACKS_LOG2 - -// SunOS 5.5 does not provide getloadavg() -#define ACE_LACKS_GETLOADAVG - -// Before we do anything, we should include <sys/feature_tests.h> to -// ensure that things are set up properly. -#include <sys/feature_tests.h> - -// Sun has the posix defines so let this file sort out what Sun delivers -#include "ace/config-posix.h" - -// Compiler version-specific settings: -#if defined (__SUNPRO_CC) -# if (__SUNPRO_CC < 0x410) - // The following might not be necessary, but I can't tell: my build - // with Sun C++ 4.0.1 never completes. -# define ACE_NEEDS_DEV_IO_CONVERSION -# elif (__SUNPRO_CC >= 0x420) -# if (__SUNPRO_CC >= 0x500) - // If -compat=4 is turned on, the old 4.2 settings for iostreams are used, - // but the newer, explicit instantiation is used (above) -# if (__SUNPRO_CC_COMPAT >= 5) -# define ACE_HAS_THR_C_DEST -# endif /* __SUNPRO_CC_COMPAT >= 5 */ -# endif /* __SUNPRO_CC >= 0x500 */ -# endif /* __SUNPRO_CC >= 0x420 */ - -# define ACE_CAST_CONST const -# define ACE_HAS_HI_RES_TIMER -# define ACE_HAS_SIG_C_FUNC /* Sun CC 5.0 needs this, 4.2 doesn't mind. */ -# define ACE_HAS_XPG4_MULTIBYTE_CHAR -# define ACE_LACKS_LINEBUFFERED_STREAMBUF -# define ACE_LACKS_SIGNED_CHAR - - /* If you want to disable threading with Sun CC, remove -mt - from your CFLAGS, e.g., using make threads=0. */ - - -// Take advantage of Sun Studio 8 (Sun C++ 5.5) or better symbol -// visibility to generate improved shared library binaries. -# if (__SUNPRO_CC > 0x540) - -# if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0 -# undef ACE_HAS_CUSTOM_EXPORT_MACROS -# else -# ifndef ACE_HAS_CUSTOM_EXPORT_MACROS -# define ACE_HAS_CUSTOM_EXPORT_MACROS -# endif /* !ACE_HAS_CUSTOM_EXPORT_MACROS */ -# define ACE_Proper_Export_Flag __symbolic -# define ACE_Proper_Import_Flag __global - -# define ACE_EXPORT_SINGLETON_DECLARATION(T) template class ACE_Proper_Export_Flag T -# define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class ACE_Proper_Export_Flag SINGLETON_TYPE <CLASS, LOCK>; - -// # define ACE_IMPORT_SINGLETON_DECLARATION(T) extern template class T -// # define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) extern template class SINGLETON_TYPE<CLASS, LOCK>; - -# endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */ -# endif /* __SUNPRO_CC > 0x540 (> Sun C++ 5.4) */ - -#elif defined (__GNUG__) -# include "ace/config-g++-common.h" - -# define ACE_HAS_HI_RES_TIMER -# define ACE_HAS_XPG4_MULTIBYTE_CHAR - -# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0 - // ACE_MT_SAFE is #defined below, for all compilers. -# if !defined (_REENTRANT) - /* If you want to disable threading, comment out the following - line. Or, add -DACE_MT_SAFE=0 to your CFLAGS, e.g., using - make threads=0. */ -# define _REENTRANT -# endif /* _REENTRANT */ -# endif /* !ACE_MT_SAFE */ - -#else /* ! __SUNPRO_CC && ! __GNUG__ */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-sunos5.5.h -# endif /* __cplusplus */ -#endif /* ! __SUNPRO_CC && ! __GNUG__ */ - -#if !defined (__ACE_INLINE__) -// @note If you have link problems with undefined inline template -// functions with Sun C++, be sure that the #define of __ACE_INLINE__ -// below is not commented out. -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Platform supports the POSIX regular expression library. -// @note Please comment out the ACE_HAS_REGEX #define if you -// have link problems with g++ or egcs on SunOS 5.5. -#define ACE_HAS_REGEX - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// select()'s timeval arg is not declared as const and may be modified -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE -#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -#define ACE_HAS_UALARM -#define ACE_LACKS_UALARM_PROTOTYPE - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// This setting was determined by running the autoconf tests. If it doesn't -// work uniformly, will need some tweaking, possibly based on other -// XPG feature-test macros. -#define ACE_HAS_CONST_CHAR_SWAB - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// ACE_HAS_CLOCK_GETTIME requires linking with -lposix4. -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T -#define ACE_HAS_GETRUSAGE - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -// SunOS 5.5.x does not support mkstemp -#define ACE_LACKS_MKSTEMP -#define ACE_LACKS_SYS_SYSCTL_H - -#if !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)) -# define ACE_HAS_CHARPTR_SHMDT -#endif - -#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 1) -#if defined (_REENTRANT) || \ - (defined (_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) || \ - defined (_POSIX_PTHREAD_SEMANTICS) - // Compile using multi-thread libraries. -# define ACE_HAS_THREADS - -# if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# endif /* ACE_MT_SAFE */ - - // Platform supports POSIX pthreads *and* Solaris threads, by - // default! If you only want to use POSIX pthreads, add - // -D_POSIX_PTHREAD_SEMANTICS to your CFLAGS. Or, #define it right - // here. See the Intro (3) man page for information on - // -D_POSIX_PTHREAD_SEMANTICS. -# if defined (_POSIX_PTHREAD_SEMANTICS) -# define ACE_LACKS_RWLOCK_T -# else -# define ACE_HAS_STHREADS -# endif /* ! _POSIX_PTHREAD_SEMANTICS */ - -# define ACE_HAS_PTHREADS - // . . . but only supports SCHED_OTHER scheduling policy -# define ACE_HAS_ONLY_SCHED_OTHER -# define ACE_HAS_SIGWAIT -# define ACE_HAS_SIGTIMEDWAIT -# define ACE_HAS_SIGSUSPEND -# define ACE_LACKS_PTHREAD_ATTR_SETSTACK - - // Compiler/platform has thread-specific storage -# define ACE_HAS_THREAD_SPECIFIC_STORAGE - - // Platform supports reentrant functions (i.e., all the POSIX *_r functions). -# define ACE_HAS_REENTRANT_FUNCTIONS - -# define ACE_NEEDS_LWP_PRIO_SET -# define ACE_HAS_THR_YIELD -# define ACE_LACKS_PTHREAD_YIELD -#endif /* _REENTRANT || _POSIX_C_SOURCE >= 199506L || \ - _POSIX_PTHREAD_SEMANTICS */ -#endif /* !ACE_MT_SAFE || ACE_MT_SAFE == 1 */ - -#define ACE_HAS_PRIOCNTL - -// Platform supports ACE_TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports ACE_TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides ACE_TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform has broken t_error() prototype. -#define ACE_HAS_BROKEN_T_ERROR - -// Platform supports ACE_TLI. -#define ACE_HAS_TLI - -#define ACE_HAS_GETPAGESIZE 1 - -#define ACE_HAS_IDTYPE_T - -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#define ACE_LACKS_ISCTYPE -#define ACE_LACKS_ISBLANK - -#if defined (__SUNPRO_CC) -# define ACE_CC_NAME ACE_TEXT ("SunPro C++") -# define ACE_CC_MAJOR_VERSION (__SUNPRO_CC >> 8) -# define ACE_CC_MINOR_VERSION (__SUNPRO_CC & 0x00ff) -# define ACE_CC_BETA_VERSION (0) -#endif /* __SUNPRO_CC */ - -#if defined (i386) && (_FILE_OFFSET_BITS==32) -# define ACE_HAS_X86_STAT_MACROS -#endif /* i386 && _FILE_OFFSET_BITS==32 */ - -#define ACE_MALLOC_ALIGN ((size_t)8) -#define ACE_LACKS_SETREUID_PROTOTYPE -#define ACE_LACKS_SETREGID_PROTOTYPE - -// Solaris does indeed implement the inet_aton() function, but it is -// found in `libresolv.*'. It doesn't seem worth it to link another -// library just for that function. Just use the emulation in ACE that -// has been used for years. -#define ACE_LACKS_INET_ATON - -// Solaris doesn't have wcstoull -#define ACE_LACKS_WCSTOLL -#define ACE_LACKS_WCSTOULL - -#if defined (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) -#undef ACE_HAS_PROC_FS -#undef ACE_HAS_PRUSAGE_T -#endif /* (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) */ - -// Sum of the iov_len values can't be larger then SSIZE_MAX -#define ACE_HAS_SOCK_BUF_SIZE_MAX - -#define ACE_LACKS_SETENV -#define ACE_LACKS_UNSETENV - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.6.h b/ACE/ace/config-sunos5.6.h deleted file mode 100644 index cea92f98471..00000000000 --- a/ACE/ace/config-sunos5.6.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.6 -// platforms using the SunC++ 4.x or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.5 config file, then add SunOS 5.6 updates below. - -#include "ace/config-sunos5.5.h" - -#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || \ - defined (__EXTENSIONS__) -// The asctime_r/ctime_r parameters change at POSIX.1c-1995 -# if (defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L) -# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -# endif /* POSIX_C_SOURCE >= 199506L */ -# define ACE_HAS_SIGWAIT -// Hack 'cuz _POSIX_C_SOURCE > 2 and -DEXTENSIONS hides this. -# define ACE_LACKS_MADVISE_PROTOTYPE -#endif /* _POSIX_C_SOURCE > 2 || __EXTENSIONS__ */ - -// Support for the SunC++ 5.2 compiler. -// Do not undefine for compat mode < 5 -#if defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510 -#if defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT >= 5) -#ifdef ACE_LACKS_ACE_IOSTREAM -#undef ACE_LACKS_ACE_IOSTREAM -#endif /* ACE_LACKS_ACE_IOSTREAM */ -#endif /* defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT >= 5) */ - -#ifndef ACE_LACKS_UNBUFFERED_STREAMBUF -#define ACE_LACKS_UNBUFFERED_STREAMBUF 1 -#endif /* ACE_LACKS_UNBUFFERED_STREAMBUF */ -// Forte 7 seems to botch this one... -#ifndef ACE_HAS_THR_C_DEST -#define ACE_HAS_THR_C_DEST 1 -#endif /* ACE_HAS_THR_C_DEST */ -#ifndef ACE_HAS_THR_C_FUNC -#define ACE_HAS_THR_C_FUNC 1 -#endif /* ACE_HAS_THR_C_FUNC */ -#ifndef ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES 1 -#endif /* ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */ -#ifndef ACE_HAS_SIG_C_FUNC -#define ACE_HAS_SIG_C_FUNC 1 -#endif /* ACE_HAS_SIG_C_FUNC */ -#ifndef ACE_LACKS_IOSTREAM_FX -#define ACE_LACKS_IOSTREAM_FX 1 -#endif /* ACE_LACKS_IOSTREAM_FX */ -#ifndef ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 -#endif /* ACE_LACKS_LINEBUFFERED_STREAMBUF */ - -#endif /* defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510 */ - -// SunOS 5.6 and above support mkstemp -#undef ACE_LACKS_MKSTEMP - -// SunOS 5.6 has AIO calls. -#if !defined (ACE_HAS_AIO_CALLS) -#define ACE_HAS_AIO_CALLS -#endif /* ACE_HAS_AIO_CALLS */ - -#if !defined (ACE_HAS_POSIX_REALTIME_SIGNALS) -#define ACE_HAS_POSIX_REALTIME_SIGNALS -#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ - -#if !defined (ACE_HAS_POSIX_MESSAGE_PASSING) -#define ACE_HAS_POSIX_MESSAGE_PASSING -#endif /* ACE_HAS_POSIX_MESSAGE_PASSING */ - -#if !defined (ACE_HAS_POSIX_SEM) -#define ACE_HAS_POSIX_SEM -#endif /* ACE_HAS_POSIX_SEM */ - -// Sunos 5.6's aio_* with RT signals is broken. -#if !defined (ACE_POSIX_AIOCB_PROACTOR) -#define ACE_POSIX_AIOCB_PROACTOR -#endif /* ACE_POSIX_AIOCB_PROACTOR */ - -// SunOS 5.6 introduced shm_open, but need to turn on POSIX.1b or higher -// to pick it up. -#if defined (_POSIX_C_SOURCE) && (_POSIX_C_SOURCE > 2) -# define ACE_HAS_SHM_OPEN -#else -# undef ACE_HAS_SHM_OPEN -#endif /* _POSIX_C_SOURCE > 2 */ - -// The struct msghdr is conditional on SunOS 5.6 based on _XPG4_2 -#if defined(_XPG4_2) -# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#endif /* _XPG4_2 */ - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.7.h b/ACE/ace/config-sunos5.7.h deleted file mode 100644 index d21859e5d19..00000000000 --- a/ACE/ace/config-sunos5.7.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.7 -// (Solaris 7) platforms using the SunC++ 4.x, 5.x, or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.6 config file, then add SunOS 5.7 updates below. - -#include "ace/config-sunos5.6.h" - -// This may be true for earlier Solaris versions, but I can only verify -// it for Solaris 7 and later. -#define ACE_HAS_VFWPRINTF -#if defined (ACE_HAS_SHM_OPEN) -# define ACE_SHM_OPEN_REQUIRES_ONE_SLASH -#endif - -// Sun began distributing <sys/loadavg.h> with SunOS 5.7 -#define ACE_HAS_SYS_LOADAVG_H - -// SunOS 5.7 has getloadavg() -#undef ACE_LACKS_GETLOADAVG - -#if defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) - // Wide character methods are in std:: when using SunCC 5.3 -# define ACE_WCHAR_IN_STD_NAMESPACE -#endif - -// SunOS 5.7 supports SCHED_FIFO and SCHED_RR, as well as SCHED_OTHER. -#undef ACE_HAS_ONLY_SCHED_OTHER - -// SunOS 5.7 gets this right . . . -#undef ACE_HAS_BROKEN_T_ERROR - -// And doesn't need to set LWP priorities, as shown by -// performance-tests/Misc/preempt. -#undef ACE_NEEDS_LWP_PRIO_SET - -// SunOS 5.7 can support Real-Time Signals and POSIX4 AIO operations -// are supported. - -#if !defined (ACE_HAS_AIO_CALLS) -#define ACE_HAS_AIO_CALLS -#endif /* !ACE_HAS_AIO_CALLS */ - -// SunOS 5.7 has socklen_t -#define ACE_HAS_SOCKLEN_T - -#if defined (__sparcv9) -#if !defined (_LP64) -# define _LP64 -#endif /* _LP64 */ -#define ACE_SIZEOF_LONG 8 /* Needed to circumvent compiler bug #4294969 */ -#endif /* __sparcv9 */ - -#if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) /* XPG4 or XPG4v2 */ -// 2 parameter wcstok() -#else /* XPG4 or XPG4v2 */ -# define ACE_HAS_3_PARAM_WCSTOK -#endif - -// Solaris 7 started to support /dev/poll -#define ACE_HAS_DEV_POLL - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.8.h b/ACE/ace/config-sunos5.8.h deleted file mode 100644 index b78ee27a187..00000000000 --- a/ACE/ace/config-sunos5.8.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.8 -// (Solaris 8) platforms using the SunC++ 4.x, 5.x, 6.x, or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.7 config, then add any SunOS 5.8 updates below. -#include "ace/config-sunos5.7.h" - -#undef ACE_WCHAR_IN_STD_NAMESPACE - -// This may be true for versions prior to Solaris 8 as well, but I don't -// have any to try it on. -#if !defined (ACE_HAS_TIMEZONE) -# define ACE_HAS_TIMEZONE -#endif - -// The range of thread priorities for 5.8 differs from 5.7 in the -// minimum priority for the SCHED_OTHER policy (i.e., -// ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) -20 - -# if defined (_POSIX_PTHREAD_SEMANTICS) -# ifdef ACE_LACKS_RWLOCK_T -# undef ACE_LACKS_RWLOCK_T -# endif /* ACE_LACKS_RWLOCK_T */ -# endif /* _POSIX_PTHREAD_SEMANTICS */ - -// This is no longer the case for Sun 5.9 onwards -# undef ACE_HAS_X86_STAT_MACROS - -// gethostbyaddr does not handle IPv6-mapped-IPv4 addresses -#define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.9.h b/ACE/ace/config-sunos5.9.h deleted file mode 100644 index 53cb350fbd4..00000000000 --- a/ACE/ace/config-sunos5.9.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.9 -// (Solaris 9) platforms using the SunC++ 5.x (Forte 6 and 7), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.8 config, then add any SunOS 5.9 updates below. -#include "ace/config-sunos5.8.h" - -#define ACE_HAS_SENDFILE 1 -#define ACE_LACKS_GETADDRINFO -#define ACE_LACKS_GETNAMEINFO -#define ACE_LACKS_THR_CONCURRENCY_FUNCS - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index bca5a046873..f22fbb0f063 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -533,9 +533,6 @@ #define ACE_HAS_NONCONST_SWAB #define ACE_HAS_INT_SWAB -// gethostbyaddr does not handle IPv6-mapped-IPv4 addresses -#define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED - #if defined (ACE_WIN64) // Data must be aligned on 8-byte boundaries, at a minimum. # define ACE_MALLOC_ALIGN 8 diff --git a/ACE/ace/os_include/os_kstat.h b/ACE/ace/os_include/os_kstat.h deleted file mode 100644 index 957b608bd88..00000000000 --- a/ACE/ace/os_include/os_kstat.h +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file os_kstat.h - * - * @author Johnny Willemsen <jwillemsen@remedy.nl> - */ -//============================================================================= - -#ifndef ACE_OS_INCLUDE_OS_KSTAT_H -#define ACE_OS_INCLUDE_OS_KSTAT_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_KSTAT) -# define ACE_HAS_KSTAT_H -#endif /* ACE_HAS_KSTAT */ - -#if defined (ACE_HAS_KSTAT_H) -# include <kstat.h> -#endif /* ACE_HAS_KSTAT_H */ - -#include /**/ "ace/post.h" -#endif /* ACE_OS_INCLUDE_OS_KSTAT_H */ diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h index 1a2b2e75cdf..a789d117314 100644 --- a/ACE/ace/os_include/os_pthread.h +++ b/ACE/ace/os_include/os_pthread.h @@ -22,18 +22,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_HAS_PRIOCNTL) - // Need to #include thread.h before #defining THR_BOUND, etc., - // when building without threads on SunOS 5.x. -# if defined (sun) -# include /**/ <thread.h> -# endif /* sun */ - - // Need to #include these before #defining USYNC_PROCESS on SunOS 5.x. -# include /**/ <sys/rtpriocntl.h> -# include /**/ <sys/tspriocntl.h> -#endif /* ACE_HAS_PRIOCNTL */ - #include "ace/os_include/sys/os_types.h" #include "ace/os_include/os_stdint.h" @@ -116,25 +104,6 @@ # if !defined (ACE_THR_PRI_OTHER_MAX) # define ACE_THR_PRI_OTHER_MAX (long) PRI_OTHER_MAX # endif /* !ACE_THR_PRI_OTHER_MAX */ -# elif defined (sun) -# if !defined (ACE_THR_PRI_FIFO_MIN) -# define ACE_THR_PRI_FIFO_MIN (long) 0 -# endif /* !ACE_THR_PRI_FIFO_MIN */ -# if !defined (ACE_THR_PRI_FIFO_MAX) -# define ACE_THR_PRI_FIFO_MAX (long) 59 -# endif /* !ACE_THR_PRI_FIFO_MAX */ -# if !defined (ACE_THR_PRI_RR_MIN) -# define ACE_THR_PRI_RR_MIN (long) 0 -# endif /* !ACE_THR_PRI_RR_MIN */ -# if !defined (ACE_THR_PRI_RR_MAX) -# define ACE_THR_PRI_RR_MAX (long) 59 -# endif /* !ACE_THR_PRI_RR_MAX */ -# if !defined (ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) 0 -# endif /* !ACE_THR_PRI_OTHER_MIN */ -# if !defined (ACE_THR_PRI_OTHER_MAX) -# define ACE_THR_PRI_OTHER_MAX (long) 127 -# endif /* !ACE_THR_PRI_OTHER_MAX */ # else # if !defined (ACE_THR_PRI_FIFO_MIN) # define ACE_THR_PRI_FIFO_MIN (long) ACE_PROC_PRI_FIFO_MIN @@ -218,14 +187,12 @@ # endif /* PTHREAD_MUTEXTYPE_FAST */ # endif /* PTHREAD_PROCESS_SHARED */ -# if !defined (ACE_HAS_STHREADS) -# if !defined (USYNC_THREAD) -# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE -# endif /* ! USYNC_THREAD */ -# if !defined (USYNC_PROCESS) -# define USYNC_PROCESS PTHREAD_PROCESS_SHARED -# endif /* ! USYNC_PROCESS */ -# endif /* ACE_HAS_STHREADS */ +# if !defined (USYNC_THREAD) +# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE +# endif /* ! USYNC_THREAD */ +# if !defined (USYNC_PROCESS) +# define USYNC_PROCESS PTHREAD_PROCESS_SHARED +# endif /* ! USYNC_PROCESS */ /* MM-Graz: prevent warnings */ # undef THR_BOUND @@ -252,7 +219,7 @@ # define THR_EXPLICIT_SCHED 0x00800000 # define THR_SCHED_IO 0x01000000 -# if !defined (ACE_HAS_STHREADS) && !defined (ACE_MQX) +# if !defined (ACE_MQX) # if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM) // This needs to be moved out of here. @@ -282,8 +249,6 @@ public: # endif /* !ACE_HAS_POSIX_SEM */ # if defined (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD) - // If we are on Solaris we can just reuse the existing - // implementations of these synchronization types. # if !defined (ACE_LACKS_RWLOCK_T) && !defined (ACE_HAS_PTHREADS_UNIX98_EXT) # include /**/ <synch.h> typedef rwlock_t ACE_rwlock_t; @@ -295,7 +260,7 @@ public: # if !defined (ACE_HAS_POSIX_SEM) typedef sema_t ACE_sema_t; # endif /* !ACE_HAS_POSIX_SEM */ -# endif /* !ACE_HAS_STHREADS */ +# endif /* !ACE_MQX */ # if defined (ACE_HAS_PTHREADS_UNIX98_EXT) && !defined (ACE_LACKS_RWLOCK_T) typedef pthread_rwlock_t ACE_rwlock_t; @@ -322,26 +287,6 @@ public: # endif /* _XOPEN_SOURCE && _XOPEN_SOURCE < 600 */ # endif /* ACE_LINUX && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) */ - -#elif defined (ACE_HAS_STHREADS) -# if !defined (ACE_THR_PRI_FIFO_MIN) -# define ACE_THR_PRI_FIFO_MIN (long) 0 -# endif /* !ACE_THR_PRI_FIFO_MIN */ -# if !defined (ACE_THR_PRI_FIFO_MAX) -# define ACE_THR_PRI_FIFO_MAX (long) 59 -# endif /* !ACE_THR_PRI_FIFO_MAX */ -# if !defined (ACE_THR_PRI_RR_MIN) -# define ACE_THR_PRI_RR_MIN (long) 0 -# endif /* !ACE_THR_PRI_RR_MIN */ -# if !defined (ACE_THR_PRI_RR_MAX) -# define ACE_THR_PRI_RR_MAX (long) 59 -# endif /* !ACE_THR_PRI_RR_MAX */ -# if !defined (ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) 0 -# endif /* !ACE_THR_PRI_OTHER_MIN */ -# if !defined (ACE_THR_PRI_OTHER_MAX) -# define ACE_THR_PRI_OTHER_MAX (long) 127 -# endif /* !ACE_THR_PRI_OTHER_MAX */ #endif /* ACE_HAS_PTHREADS */ #include /**/ "ace/post.h" diff --git a/ACE/ace/os_include/os_stropts.h b/ACE/ace/os_include/os_stropts.h index 1f9c841c968..7b641bee9da 100644 --- a/ACE/ace/os_include/os_stropts.h +++ b/ACE/ace/os_include/os_stropts.h @@ -24,10 +24,6 @@ #include "ace/os_include/os_unistd.h" -#if defined (ACE_HAS_TIMOD_H) -# include /**/ <sys/timod.h> -#endif /* ACE_HAS_TIMOD_H */ - #if !defined (ACE_LACKS_SYS_IOCTL_H) # include /**/ <sys/ioctl.h> #endif /* !ACE_LACKS_SYS_IOCTL_H */ diff --git a/ACE/ace/os_include/os_time.h b/ACE/ace/os_include/os_time.h index 71d3fdca9fe..eb716ff27ec 100644 --- a/ACE/ace/os_include/os_time.h +++ b/ACE/ace/os_include/os_time.h @@ -72,8 +72,7 @@ extern "C" // straightening them out. #if defined (ACE_HAS_PTHREADS) /* POSIX.1c threads (pthreads) */ // ... and 2-parameter asctime_r and ctime_r -# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \ - !defined (ACE_HAS_STHREADS) && !defined (ACE_VXWORKS) +# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && !defined (ACE_VXWORKS) # define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R # endif #endif /* ACE_HAS_PTHREADS */ diff --git a/ACE/ace/os_include/os_unistd.h b/ACE/ace/os_include/os_unistd.h index 50db68f0abd..14d1621d3ba 100644 --- a/ACE/ace/os_include/os_unistd.h +++ b/ACE/ace/os_include/os_unistd.h @@ -33,10 +33,6 @@ # include /**/ <io.h> #endif /* ACE_HAS_IO_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if !defined (ACE_LACKS_UNISTD_H) # include /**/ <unistd.h> #endif /* !ACE_LACKS_UNISTD_H */ @@ -94,20 +90,6 @@ extern "C" # endif #endif /* ACE_WIN32 */ -#if (!defined (_BSD_SOURCE) && \ - !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)) \ - || (defined (_XOPEN_SOURCE) && defined (__GNUC__)) - -# if defined (ACE_LACKS_SETREUID_PROTOTYPE) - extern int setreuid (uid_t ruid, uid_t euid); -# endif /* ACE_LACKS_SETREUID_PROTOTYPE */ - -# if defined (ACE_LACKS_SETREGID_PROTOTYPE) - extern int setregid (gid_t rgid, gid_t egid); -# endif /* ACE_LACKS_SETREGID_PROTOTYPE */ -#endif /* !_BSD_SOURCE && !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED - || _XOPEN_SOURCE && __GNUC__ */ - // for use by access() # if !defined (R_OK) # define R_OK 04 /* Test for Read permission. */ @@ -130,27 +112,12 @@ extern "C" # define F_OK 0 /* Test for existence of File. */ # endif /* F_OK */ -#if defined (ACE_LACKS_UALARM_PROTOTYPE) - u_int ualarm (u_int usecs, u_int interval); -#endif /* ACE_LACKS_UALARM_PROTOTYPE */ - #if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \ !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED) pid_t getpgid (pid_t pid); #endif /* ACE_LACKS_GETPGID_PROTOTYPE && !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */ -#if !defined (_LARGEFILE64_SOURCE) -# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \ - defined (ACE_LACKS_LLSEEK_PROTOTYPE) -# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both! -# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE) - ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence); -# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE) - ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence); -# endif -#endif /* _LARGEFILE64_SOURCE */ - #if defined (__BORLANDC__) # define _isatty isatty #endif /* __BORLANDC__ */ diff --git a/ACE/ace/os_include/sys/os_mman.h b/ACE/ace/os_include/sys/os_mman.h index d2b9a713f56..6671ffd1c86 100644 --- a/ACE/ace/os_include/sys/os_mman.h +++ b/ACE/ace/os_include/sys/os_mman.h @@ -97,10 +97,6 @@ PAGE_NOCACHE */ # define MS_SYNC 0x0 # endif /* !MS_SYNC */ -#if !defined (ACE_LACKS_MADVISE) && defined (ACE_LACKS_MADVISE_PROTOTYPE) - extern "C" int madvise(caddr_t, size_t, int); -#endif /* !ACE_LACKS_MADVISE && ACE_LACKS_MADVISE_PROTOTYPE */ - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ACE/ace/os_include/sys/os_resource.h b/ACE/ace/os_include/sys/os_resource.h index 18b86d6809a..a014351617a 100644 --- a/ACE/ace/os_include/sys/os_resource.h +++ b/ACE/ace/os_include/sys/os_resource.h @@ -29,10 +29,6 @@ # include /**/ <sys/resource.h> #endif /* !ACE_LACKS_SYS_RESOURCE_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if defined (ACE_HAS_SYS_SYSCALL_H) # include /**/ <sys/syscall.h> #endif /* ACE_HAS_SYS_SYSCALL_H */ @@ -59,9 +55,7 @@ extern "C" }; #endif /* ACE_WIN32 */ -#if defined (ACE_HAS_PRUSAGE_T) - typedef prusage_t ACE_Rusage; -#elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) typedef rusage ACE_Rusage; #else typedef int ACE_Rusage; diff --git a/ACE/ace/os_include/sys/os_socket.h b/ACE/ace/os_include/sys/os_socket.h index 3ffee2e03b6..e3bd900fe15 100644 --- a/ACE/ace/os_include/sys/os_socket.h +++ b/ACE/ace/os_include/sys/os_socket.h @@ -255,9 +255,7 @@ extern "C" # define ACE_PROTOCOL_FAMILY_INET PF_INET #endif /* ACE_HAS_IPV6 */ -#if !defined (ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE) #define ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE SSIZE_MAX -#endif /* ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE */ #if !defined (ACE_SOCKET_LEN) #if defined (ACE_HAS_SOCKLEN_T) diff --git a/ACE/ace/os_include/sys/os_types.h b/ACE/ace/os_include/sys/os_types.h index 6d43d51e49d..b179c7051ad 100644 --- a/ACE/ace/os_include/sys/os_types.h +++ b/ACE/ace/os_include/sys/os_types.h @@ -57,8 +57,6 @@ typedef double ACE_timer_t; typedef off_t ACE_LOFF_T; #elif defined (__QNX__) typedef off64_t ACE_LOFF_T; -#elif defined (__sun) - typedef offset_t ACE_LOFF_T; #elif defined (WIN32) typedef __int64 ACE_LOFF_T; #elif (defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x700)) || defined (ACE_LYNXOS_MAJOR) |