diff options
Diffstat (limited to 'ACE/ace/POSIX_Proactor.cpp')
-rw-r--r-- | ACE/ace/POSIX_Proactor.cpp | 58 |
1 files changed, 4 insertions, 54 deletions
diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 11308f32efd..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,31 +51,8 @@ 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(HPUX) - - os_id_ = ACE_OS_HPUX; // set family - -#elif defined(__OpenBSD) - +#if defined(__OpenBSD) os_id_ = ACE_OS_OPENBSD; // set family - // do the same //#else defined (LINUX, __FreeBSD__ ...) @@ -935,16 +904,12 @@ void ACE_POSIX_AIOCB_Proactor::check_max_aio_num () aiocb_list_max_size_ = max_os_aio_num; #endif -#if defined (HPUX) || defined (__FreeBSD__) - // Although HPUX 11.00 allows to start 2048 AIO's for all process in - // system it has a limit 256 max elements for aio_suspend () It is a - // pity, but ... - +#if defined (__FreeBSD__) long max_os_listio_num = ACE_OS::sysconf (_SC_AIO_LISTIO_MAX); if (max_os_listio_num > 0 && aiocb_list_max_size_ > (unsigned long) max_os_listio_num) aiocb_list_max_size_ = max_os_listio_num; -#endif /* HPUX || __FreeBSD__ */ +#endif /* __FreeBSD__ */ // check for user-defined value // ACE_AIO_MAX_SIZE if defined in POSIX_Proactor.h @@ -1857,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 @@ -1867,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) { |