diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2023-01-13 12:36:49 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2023-01-13 12:36:49 +0100 |
commit | 22359d30f11aa48abba5a3ad7bad7bed7489ff5b (patch) | |
tree | bb91ef49f641a627fa102eda9dd3f5649c3e6c57 | |
parent | 8f0f05f51c0cf595654a35f9dc47d82809c2268d (diff) | |
download | ATCD-22359d30f11aa48abba5a3ad7bad7bed7489ff5b.tar.gz |
Fixed cleanup mistakes
* ACE/ace/OS_NS_Thread.inl:
* ACE/ace/OS_NS_stdio.inl:
* ACE/tests/Bug_3943_Regression_Test.cpp:
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 8 | ||||
-rw-r--r-- | ACE/ace/OS_NS_stdio.inl | 2 | ||||
-rw-r--r-- | ACE/tests/Bug_3943_Regression_Test.cpp | 32 |
3 files changed, 22 insertions, 20 deletions
diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index b5bed453b35..a7790f0acac 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -2602,7 +2602,7 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (ht_id, &priority), result), int); # elif defined (ACE_HAS_WTHREADS) ACE_Errno_Guard error (errno); - priority = ::CeGetThreadPriority (ht_id); + priority = ::GetThreadPriority (ht_id); # if defined (ACE_HAS_PHARLAP) # if defined (ACE_PHARLAP_LABVIEW_RT) @@ -2612,13 +2612,11 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) policy = timeslice == 0 ? ACE_SCHED_OTHER : ACE_SCHED_FIFO; # endif /* ACE_PHARLAP_LABVIEW_RT */ # else - DWORD priority_class = ::GetPriorityClass (::GetCurrentProcess ()); + DWORD const priority_class = ::GetPriorityClass (::GetCurrentProcess ()); if (priority_class == 0 && (error = ::GetLastError ()) != NO_ERROR) ACE_FAIL_RETURN (-1); - policy = - (priority_class == - REALTIME_PRIORITY_CLASS) ? ACE_SCHED_FIFO : ACE_SCHED_OTHER; + policy = (priority_class == REALTIME_PRIORITY_CLASS) ? ACE_SCHED_FIFO : ACE_SCHED_OTHER; # endif /* ACE_HAS_PHARLAP */ return 0; diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index 16df1c12485..ac5f568abdf 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -903,7 +903,7 @@ ACE_OS::rewind (FILE *fp) # endif /* ACE_LACKS_REWIND */ #else // This isn't perfect since it doesn't reset EOF, but it's probably - // the closest we can get on WINCE. + // the closest we can get on MQX. (void) std::fseek (fp, 0L, SEEK_SET); #endif /* !ACE_MQX */ } diff --git a/ACE/tests/Bug_3943_Regression_Test.cpp b/ACE/tests/Bug_3943_Regression_Test.cpp index fbc370ecbb6..b0155ef6d2c 100644 --- a/ACE/tests/Bug_3943_Regression_Test.cpp +++ b/ACE/tests/Bug_3943_Regression_Test.cpp @@ -174,10 +174,14 @@ namespace { int processENOBUFS() { +#if defined (ACE_WIN32) // it has been identified that Windows7 does not have the ENOBUFS issue // but testing has not been performed on Server 2008 or Vista to identify - // wether the issue exists or not + // whether the issue exists or not return beforeVersion(6, 1, VER_NT_WORKSTATION); +#else + return 0; +#endif /* ACE_WIN32 */ } struct IovecGuard @@ -192,31 +196,31 @@ namespace { static const int ALL_SLOTS = -1; }; + /* + * This class is the product created by both ACE_Connector + * and ACE_Acceptor objects. + * + * This class gets its own header file to work around AIX C++ + * compiler "features" related to template instantiation... It is + * only used by Conn_Test.cpp. + */ class Svc_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> { - // = TITLE - // This class is the product created by both <ACE_Connector> - // and <ACE_Acceptor> objects. - // - // = DESCRIPTION - // This class gets its own header file to work around AIX C++ - // compiler "features" related to template instantiation... It is - // only used by Conn_Test.cpp. public: - Svc_Handler (ACE_Thread_Manager * = 0); // Do-nothing constructor. + Svc_Handler (ACE_Thread_Manager * = nullptr); - int open (void *) override; // Initialization hook. + int open (void *) override; - void send_data (); // Send data to server. + void send_data (); - void recv_data (); // Recv data from client. + void recv_data (); - int close (u_long = 0) override; // Shutdown the <Svc_Handler>. + int close (u_long = 0) override; private: enum Direction { READX, WRITEX }; // VxWorks defines READ and WRITE |